none-ls.nvim icon indicating copy to clipboard operation
none-ls.nvim copied to clipboard

Restart / Auto restart

Open otavioschwanck opened this issue 2 years ago • 5 comments

Issues

  • [X] 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

otavioschwanck avatar Nov 16 '23 13:11 otavioschwanck

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.

laurentS avatar Nov 16 '23 20:11 laurentS

@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.

jakenvac avatar Nov 27 '23 09:11 jakenvac

@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.

otavioschwanck avatar Nov 27 '23 22:11 otavioschwanck

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

jakenvac avatar Nov 28 '23 09:11 jakenvac

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.

chaneyzorn avatar Dec 04 '23 09:12 chaneyzorn