runtime(compiler): add pyright Python type checker

Commit: 
https://github.com/vim/vim/commit/1ff2239053684add9ead3c121e12169e7682db7a
Author: Konfekt <[email protected]>
Date:   Sat Dec 27 14:07:21 2025 +0000

    runtime(compiler): add pyright Python type checker
    
    closes: https://github.com/vim/vim/issues/19017
    
    Signed-off-by: Konfekt <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/compiler/pyright.vim b/runtime/compiler/pyright.vim
new file mode 100644
index 000000000..a7dad6f37
--- /dev/null
+++ b/runtime/compiler/pyright.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler:     Pyright (Python Type Checker)
+" Maintainer:   @konfekt
+" Last Change:  2025 Dec 26
+
+if exists("current_compiler") | finish | endif
+let current_compiler = "pyright"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" CompilerSet makeprg=pyright
+" CompilerSet makeprg=basedpyright
+exe 'CompilerSet makeprg=' ..  escape(
+        \ get(b:, 'pyright_makeprg', get(g:, 'pyright_makeprg', 'pyright')),
+        \ ' \|"')
+CompilerSet errorformat=
+      \%E%f:%l:%c\ -\ error:\ %m,
+      \%W%f:%l:%c\ -\ warning:\ %m,
+      \%N%f:%l:%c\ -\ note:\ %m,
+      \%C[     ]\ %.%#,
+      \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index d19b26d7f..73e4205d7 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 Dec 21
+*quickfix.txt*  For Vim version 9.1.  Last change: 2025 Dec 27
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1654,6 +1654,13 @@ b/g:mypy_makeprg_params variable.  For example: >
 
 The global default is "--strict --ignore-missing-imports".
 
+PYRIGHT TYPE CHECKER                                   *compiler-pyright*
+
+Commonly used compiler options can be added to 'makeprg' by setting the
+b/g:pyright_makeprg_params variable.
+
+The global default is "pyright".
+
 TY TYPE CHECKER                                        *compiler-ty*
 
 Commonly used compiler options and executable can be set by the
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 6a00cc789..3496a86a2 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6772,6 +6772,7 @@ compiler-mypy     quickfix.txt    /*compiler-mypy*
 compiler-pandoc        quickfix.txt    /*compiler-pandoc*
 compiler-perl  quickfix.txt    /*compiler-perl*
 compiler-pylint        quickfix.txt    /*compiler-pylint*
+compiler-pyright       quickfix.txt    /*compiler-pyright*
 compiler-pytest        quickfix.txt    /*compiler-pytest*
 compiler-pyunit        quickfix.txt    /*compiler-pyunit*
 compiler-ruff  quickfix.txt    /*compiler-ruff*

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vZV4U-000n6L-Vk%40256bit.org.

Raspunde prin e-mail lui