diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-11-09 08:43:43 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-11-09 08:43:50 +0800 |
commit | b4c5e743ac66bd288017d769e06751cf9cda9a18 (patch) | |
tree | 4f4dcdf54ccd9cd6830455c04381728bf90f830e /runtime/compiler/ruff.vim | |
parent | 5c600370e0c0980caffebc1c6563da2d750ff34a (diff) | |
download | rneovim-b4c5e743ac66bd288017d769e06751cf9cda9a18.tar.gz rneovim-b4c5e743ac66bd288017d769e06751cf9cda9a18.tar.bz2 rneovim-b4c5e743ac66bd288017d769e06751cf9cda9a18.zip |
vim-patch:6d9a145: runtime(compiler): add mypy and ruff compiler; update pylint linter
mypy and ruff come from
https://github.com/Konfekt/vim-compilers/tree/master/compiler and the
former was added by @pbnj-dragon
closes: vim/vim#16007
https://github.com/vim/vim/commit/6d9a145d719857fe461d045adf3b61ec4b4bb53f
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Diffstat (limited to 'runtime/compiler/ruff.vim')
-rw-r--r-- | runtime/compiler/ruff.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/compiler/ruff.vim b/runtime/compiler/ruff.vim new file mode 100644 index 0000000000..11a69740d8 --- /dev/null +++ b/runtime/compiler/ruff.vim @@ -0,0 +1,19 @@ +" Vim compiler file +" Compiler: Ruff (Python linter) +" Maintainer: @pbnj-dragon +" Last Change: 2024 Nov 07 + +if exists("current_compiler") | finish | endif +let current_compiler = "ruff" + +let s:cpo_save = &cpo +set cpo&vim + +" CompilerSet makeprg=ruff +let &l:makeprg= 'ruff check --output-format=concise ' + \ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')) +exe 'CompilerSet makeprg='..escape(&l:makeprg, ' "') +CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f: + +let &cpo = s:cpo_save +unlet s:cpo_save |