Commit: runtime(ty): include ty compiler plugin

1 view
Skip to first unread message

Christian Brabandt

unread,
Dec 21, 2025, 2:30:56 PM (17 hours ago) Dec 21
to vim...@googlegroups.com
runtime(ty): include ty compiler plugin

Commit: https://github.com/vim/vim/commit/e09ff341294dbdd5c2db2342efc564ba34444571
Author: Konfekt <Kon...@users.noreply.github.com>
Date: Sun Dec 21 19:17:14 2025 +0000

runtime(ty): include ty compiler plugin

closes: https://github.com/vim/vim/issues/18960

Signed-off-by: Konfekt <Kon...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/compiler/ty.vim b/runtime/compiler/ty.vim
new file mode 100644
index 000000000..5684b29f6
--- /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 669e4f29d..d19b26d7f 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 684f392d5..05e967c4e 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*
Reply all
Reply to author
Forward
0 new messages