5

I have null-ls setup with nvim and have a mypy diagnostic in my sources that I run on save

null_ls.builtins.diagnostics.mypy.with({
 method = null_ls.methods.DIAGNOSTICS_ON_SAVE}),

But as soon as I do, for example, nvim main.py, I get this error

[null-ls] failed to run generator: ...t/null-ls.nvim/lua/null-ls/helpers/generat
or_factory.lua:218: error in generator output: mypy: can't read file '/Users/me/main.py': No such file or directory

The error disappears if I save the file and go back inside it.

Is the diagnostic running as soon as I open the file, even though I have it on save? btw, I don't get this error at all with black or flake8 which I also have configured in sources.

romainl
  • 186,200
  • 21
  • 280
  • 313
haulvulgar
  • 98
  • 1
  • 6

0 Answers0