lsp icon indicating copy to clipboard operation
lsp copied to clipboard

How to disable lsp / stop the server?

Open ulzu opened this issue 10 months ago • 1 comments

I do not need it running always. It's not rare for it to hang for a short time and it gives out diagnostics on save and it's jarring and not needed all time. How do I disable it dynamically? (not the LspDiag highlight disable which doesn't stop diagnostics.)

ulzu avatar Feb 15 '25 23:02 ulzu

I am kind of curious about this too. I was trying this plugin out and a little surprised it didn't give an ability to turn off once it's used. I can see how some folks just leave it permanently off but I think there should be a way to turn it off without restarting Vim.

ychin avatar Feb 24 '25 08:02 ychin

I would also like to be able to stop the server.

Sometimes, especially when starting a new C project, I don't have all the necessary LSP stuff set up, so the diagnostics are erroneous. It would be great if there were a command, e.g. LspServer stop, to just disable the language server temporarily in this case.

TheDreadedAndy avatar Sep 08 '25 17:09 TheDreadedAndy

I have added support for stopping and starting the server using the :LspServer stop and :LspServer start commands in https://github.com/yegappan/lsp/commit/e84b35b3c105108d7fdc97574ce132e8011715a7. Can you try the latest plugin?

yegappan avatar Sep 09 '25 02:09 yegappan

I tried it and it works perfectly, thanks!

TheDreadedAndy avatar Sep 09 '25 16:09 TheDreadedAndy