Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix highlight errors when lsp crash or stop (nvim-lua#864)
* Fix highlight errors when lsp crash or stop It adds a check wether the client is still available before highlighting. If the client is not there anymore it returns `true` to unregister the autocommand This fix the `method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer` errors when doing a LspRestart or the server crashes * Delete the highlight autocommands in the LspDetatch event * Only delete autocmds for the current buffer with the group name * Simplify clearing the autocommands --------- Co-authored-by: Francis Belanger <[email protected]>
- Loading branch information