]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(ty): include ty compiler plugin
authorKonfekt <Konfekt@users.noreply.github.com>
Sun, 21 Dec 2025 19:17:14 +0000 (19:17 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 21 Dec 2025 19:17:14 +0000 (19:17 +0000)
closes: #18960

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/compiler/ty.vim [new file with mode: 0644]
runtime/doc/quickfix.txt
runtime/doc/tags

diff --git a/runtime/compiler/ty.vim b/runtime/compiler/ty.vim
new file mode 100644 (file)
index 0000000..5684b29
--- /dev/null
@@ -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
index 669e4f29d19f64ffe1c6b6533cbb0a5a16907aa6..d19b26d7f1995dac1f77ada8dc668ce3481faead 100644 (file)
@@ -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
index 684f392d56a5a1642ec3c2e194b2b87dc7f6f556..05e967c4e6fd63b6c37a194c99379ea855a77947 100644 (file)
@@ -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*