From: Konfekt Date: Sun, 21 Dec 2025 19:17:14 +0000 (+0000) Subject: runtime(ty): include ty compiler plugin X-Git-Tag: v9.1.2004~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e09ff341294dbdd5c2db2342efc564ba34444571;p=thirdparty%2Fvim.git runtime(ty): include ty compiler plugin closes: #18960 Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- diff --git a/runtime/compiler/ty.vim b/runtime/compiler/ty.vim new file mode 100644 index 0000000000..5684b29f68 --- /dev/null +++ b/runtime/compiler/ty.vim @@ -0,0 +1,19 @@ +" Vim compiler file +" Compiler: Ty (Python Type Checker) +" Maintainer: @konfekt +" Last Change: 2024 Dec 18 + +if exists("current_compiler") | finish | endif +let current_compiler = "ty" + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=ty +exe 'CompilerSet makeprg=' .. escape( + \ get(b:, 'ty_makeprg', get(g:, 'ty_makeprg', 'ty --no-progress --color=never')) + \ ..' check --output-format=concise', ' \|"') +CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f: + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 669e4f29d1..d19b26d7f1 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2025 Nov 09 +*quickfix.txt* For Vim version 9.1. Last change: 2025 Dec 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1654,6 +1654,15 @@ b/g:mypy_makeprg_params variable. For example: > The global default is "--strict --ignore-missing-imports". +TY TYPE CHECKER *compiler-ty* + +Commonly used compiler options and executable can be set by the +b/g:ty_makeprg variable. For example: > + + let b:ty_makeprg = "uv run ty" + +The global default is "ty --no-progress --color=never". + RUFF LINTER *compiler-ruff* Commonly used compiler options can be added to 'makeprg' by setting the diff --git a/runtime/doc/tags b/runtime/doc/tags index 684f392d56..05e967c4e6 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6779,6 +6779,7 @@ compiler-spotbugs quickfix.txt /*compiler-spotbugs* compiler-tex quickfix.txt /*compiler-tex* compiler-tombi quickfix.txt /*compiler-tombi* compiler-tsc quickfix.txt /*compiler-tsc* +compiler-ty quickfix.txt /*compiler-ty* compiler-typst quickfix.txt /*compiler-typst* compiler-vaxada ft_ada.txt /*compiler-vaxada* compl-current insert.txt /*compl-current*