Skip to content

Stopping an LSP makes the editor unusable #74

Description

@WhyNotHugo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions