aboutsummaryrefslogtreecommitdiff
path: root/runtime/compiler/mypy.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-11-09 09:31:52 +0800
committerGitHub <noreply@github.com>2024-11-09 09:31:52 +0800
commitb7e1bbfb50c78352e31a6b27f430db3c8f4fbf1d (patch)
treebd284a9d68f1c0f83d7bdf50fc2924d3003f9265 /runtime/compiler/mypy.vim
parent5a27d02584656f35d757c01f10a1d3c88910c519 (diff)
parentc914ecf4c930f247123ec40ffc4b59461cd1a1f2 (diff)
downloadrneovim-b7e1bbfb50c78352e31a6b27f430db3c8f4fbf1d.tar.gz
rneovim-b7e1bbfb50c78352e31a6b27f430db3c8f4fbf1d.tar.bz2
rneovim-b7e1bbfb50c78352e31a6b27f430db3c8f4fbf1d.zip
Merge pull request #31130 from zeertzjq/vim-3780c11
vim-patch: runtime file updates
Diffstat (limited to 'runtime/compiler/mypy.vim')
-rw-r--r--runtime/compiler/mypy.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/compiler/mypy.vim b/runtime/compiler/mypy.vim
new file mode 100644
index 0000000000..891488626a
--- /dev/null
+++ b/runtime/compiler/mypy.vim
@@ -0,0 +1,19 @@
+" Vim compiler file
+" Compiler: Mypy (Python static checker)
+" Maintainer: @Konfekt
+" Last Change: 2024 Nov 07
+
+if exists("current_compiler") | finish | endif
+let current_compiler = "mypy"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+" CompilerSet makeprg=mypy
+let &l:makeprg = 'mypy --show-column-numbers '
+ \ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports'))
+exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "')
+CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m
+
+let &cpo = s:cpo_save
+unlet s:cpo_save