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:
Remove the CursorHold handler when an LSP detatches. This seems like the correct fix, but I'm not sure how to do it.
Check that an LSP supports textDocument/documentSymbol inside update_current_function. This might be more inefficient but easier to do.
Looks like the
on_attach
function sets aCursorHold
handler, which gets triggered even after runningLspStop
.The consequence is that if an LSP is stopped, neovim will continuously spam the following error:
I think there may be two possible fixes:
CursorHold
handler when an LSP detatches. This seems like the correct fix, but I'm not sure how to do it.textDocument/documentSymbol
insideupdate_current_function
. This might be more inefficient but easier to do.