nvimtools / none-ls.nvim

null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restart / Auto restart

otavioschwanck opened this issue · comments

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

null-ls has a issue about that:

Sometimes, when i pull on the project, some libraries installed are different, and the rubocop (diagnostic) stop working. Because of that, the diagnostic just stop working until i restart the neovim.

Would be awesome to have a :NullRestart or have some auto-restart on the diagnostic

Help

No

Implementation help

No response

Have you tried :LspRestart? I am not sure it would do what you want, but worth a try since null-ls runs behind the whole LSP system.

@otavioschwanck can you confirm if :LspRestart does what you're after?

If not, this is something that I would be interesting in drafting up a solution to make it work.

To me it makes sense to rely on the native LSP behaviors wherever possible. Rather than having a separate command.

@otavioschwanck can you confirm if :LspRestart does what you're after?

If not, this is something that I would be interesting in drafting up a solution to make it work.

To me it makes sense to rely on the native LSP behaviors wherever possible. Rather than having a separate command.

LspRestart doesn't works.

Thanks for confirming. I'll see if I can get some time to throw something together.

How about call enable again:

local nls = require("null-ls")
nls.enable({ name = "cspell", method = nls.methods.DIAGNOSTICS })

I use it to refresh spell check diagnostics.