tpope/vim-projectionist

Projectionist messes up errorformat

Closed this issue · 1 comments

After putting in .projections.json the following:

{
  "*.py": {"make": "venv/bin/mypy\ %"}
}

and running :make on a python file,
mypy will correctly find the errors, but they won't be recognized by vim.

If I set the makeprg manually however, it will work.

tpope commented

The assumption here is that the default 'errorformat' isn't very useful most of the time as it's pretty specific to make itself. Instead, it tries to find a compiler plugin named mypy.vim, and if that fails, falls back to something generic. If the default 'errorformat' works for you, you can tell Projectionist to use it with a simple compiler plugin of your own. Put this in compiler/mypy.vim in your runtime path (e.g., ~/.vim):

if exists("current_compiler")
  finish
endif
let current_compiler = "mypy"

CompilerSet makeprg=mypy

CompilerSet errorformat<

Untested but it should work.