neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

ruff.vim (778B)


      1 " Vim compiler file
      2 " Compiler:     Ruff (Python linter)
      3 " Maintainer:   @pbnj-dragon
      4 " Last Change:  2024 Nov 07
      5 "		2024 Nov 19 by the Vim Project (properly escape makeprg setting)
      6 "		2025 Nov 06 by the Vim Project (do not set buffer-local makeprg)
      7 "		2024 Dec 24 by the Vim Project (mute Found messages)
      8 
      9 if exists("current_compiler") | finish | endif
     10 let current_compiler = "ruff"
     11 
     12 let s:cpo_save = &cpo
     13 set cpo&vim
     14 
     15 " CompilerSet makeprg=ruff
     16 exe 'CompilerSet makeprg=' .. escape('ruff check --output-format=concise '
     17        \ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')),
     18        \ ' \|"')
     19 CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
     20 CompilerSet errorformat+=%-GFound\ %.%#
     21 
     22 let &cpo = s:cpo_save
     23 unlet s:cpo_save