mypy.vim 554 B

1234567891011121314151617181920
  1. " Vim compiler file
  2. " Compiler: Mypy (Python static checker)
  3. " Maintainer: @Konfekt
  4. " Last Change: 2024 Nov 19
  5. if exists("current_compiler") | finish | endif
  6. let current_compiler = "mypy"
  7. let s:cpo_save = &cpo
  8. set cpo&vim
  9. " CompilerSet makeprg=mypy
  10. let &l:makeprg = 'mypy --show-column-numbers '
  11. \ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports'))
  12. exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
  13. CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m
  14. let &cpo = s:cpo_save
  15. unlet s:cpo_save