commit 66b2e7da8a1fa6ba9587d89b94c0da185a4c6bc9
parent ed8fbd2e2992cb264cb62585098a1c7acc5c4585
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun, 8 Feb 2026 08:26:55 +0800
Merge pull request #37770 from zeertzjq/vim-1ff2239
vim-patch: runtime file updates
Diffstat:
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/runtime/autoload/python3complete.vim b/runtime/autoload/python3complete.vim
@@ -448,7 +448,7 @@ class PyParser:
def _parseassignment(self):
assign=''
tokentype, token, indent = self.donext()
- if tokentype == tokenize.STRING or token == 'str':
+ if tokentype == tokenize.STRING or token == 'str':
return '""'
elif token == '(' or token == 'tuple':
return '()'
@@ -556,7 +556,7 @@ class PyParser:
freshscope = True
dbg("new scope: class")
self.scope = self.scope.add(cls)
-
+
elif token == 'import':
imports = self._parseimportlist()
for mod, alias in imports:
@@ -578,7 +578,7 @@ class PyParser:
elif tokentype == STRING:
if freshscope: self.scope.doc(token)
elif tokentype == NAME:
- name,token = self._parsedotname(token)
+ name,token = self._parsedotname(token)
if token == '=':
stmt = self._parseassignment()
dbg("parseassignment: %s = %s" % (name, stmt))
diff --git a/runtime/compiler/pyright.vim b/runtime/compiler/pyright.vim
@@ -0,0 +1,25 @@
+" Vim compiler file
+" Compiler: Pyright (Python Type Checker)
+" Maintainer: @konfekt
+" Last Change: 2025 Feb 7
+
+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[\ \t]\ %.%#,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
@@ -1656,6 +1656,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