Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping an LSP makes the editor unusable #74

Open
WhyNotHugo opened this issue Apr 22, 2022 · 0 comments
Open

Stopping an LSP makes the editor unusable #74

WhyNotHugo opened this issue Apr 22, 2022 · 0 comments

Comments

@WhyNotHugo
Copy link

Looks like the on_attach function sets a CursorHold handler, which gets triggered even after running LspStop.

The consequence is that if an LSP is stopped, neovim will continuously spam the following error:

Error detected while processing CursorHold Autocommands for "<buffer=1>":
method textDocument/documentSymbol is not supported by any of the servers registered for the current buffer

I think there may be two possible fixes:

  1. Remove the CursorHold handler when an LSP detatches. This seems like the correct fix, but I'm not sure how to do it.
  2. Check that an LSP supports textDocument/documentSymbol inside update_current_function. This might be more inefficient but easier to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant