illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.14k
stars
47
forks
source link
Error occurs when LspStop and move the cursor #101
Describe the bug
I want to turn off LSP when Neovim is running slow, but when I do LspStop I get an error from vim-illuminate.
Error message:
Error detected while processing CursorMoved Autocommands for "<buffer=1>":
method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer
Error detected while processing CursorMoved Autocommands for "<buffer=1>":
method textDocument/documentHighlight is not supported by any of the servers registered for the current buffer
Expected behavior
No errors are displayed.
Additional context
If you execute this command, no error will occur.
:autocmd! vim_illuminate_lsp1
Describe the bug I want to turn off LSP when Neovim is running slow, but when I do LspStop I get an error from vim-illuminate.
Error message:
I think the problem is that there is no check for LSP status in this part of the condition. https://github.com/RRethy/vim-illuminate/blob/3b9b6481a659bdc37a55f488c92839e3804ca098/lua/illuminate.lua#L87
To Reproduce
require("illuminate").on_attach(client)
:LspStop
Expected behavior No errors are displayed.
Additional context If you execute this command, no error will occur.
:autocmd! vim_illuminate_lsp1