nvim-lint
nvim-lint copied to clipboard
Help getting the plugin to work (mypy)
Hi, I've been trying for an hour to get the plugin to lint using mypy. I can see that a mypy process spawns in my process monitor but there is nothing showing up in Neovim.
My config:
require('lint').linters_by_ft.python = { 'mypy', }
Then in Neovim I run manually :lua require("lint").try_lint()
and nothing shows up. If I run :lua = vim.diagnostic.get()
I get an empty table.
if I run mypy in my terminal with the same default flags:
mypy --show-column-numbers --hide-error-codes --hide-error-context --no-color-output --no-error-summary --no-pretty myfile.py
I get mypy output with the errors in my file.
Are there any logs of the ouput somewhere I can check?
Are you on Windows? #480 affects mypy on Windows, and it would be fixed by #513.
I'm on Linux (NixOS)
@karb94 Were you able to fix this? I am having the same problem (I am on windows tho)
Edit: It does not work on my linux system either
I ran into a problem with the same symptoms, due to an outdated mypy in my poetry lockfile. Upgrading mypy from 0.971 to the recent 1.10.1 fixed the issue in my case.
The older version didn't support the --show-error-end
parameter, which is used by nvim-lint in its mypy configuration. This parameter reports the error locations in a file.
This appears to be working for me now. As @verbosemode mentioned, this was likely a mypy version issue.