RRethy / vim-illuminate

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.16k stars 47 forks source link

Fails to work after d293eb #33

Closed xxdavid closed 5 years ago

xxdavid commented 5 years ago

Hi, thank you for this great plugin again, it helps me everyday!

However, probably after commit d293eb5400, it suddenly stopped working. Any time I move my cursor on a word, this error pops up:

Error detected while processing function <SNR>140_illuminate:                                                                                                                                 
line    9:                                                                                                                                                                                    
E492: Not an editor command:  index(g:Illuminate_ftHighlightGroups[&filetype], synIDattr(synID(line('.'), col('.'), 1), 'name')) >= 0

Running :echo index(g:Illuminate_ftHighlightGroups[&filetype], synIDattr(synID(line('.'), col('.'), 1), 'name')) >= 0 works though (prints 0).

Do you know what could be the cause?

I'm using neovim 0.3.5 (tested on 0.3.1 too).

bobrippling commented 5 years ago

Let me know if my change / c22cda2 fixes this.

xxdavid commented 5 years ago

@bobrippling, yep, this fixes it! Thank you!

RRethy commented 5 years ago

Oops, thanks for the fix @bobrippling . Weird that it continued to work for me even without the \, might be due some difference with how Neovim interprets vimscript.

bobrippling commented 5 years ago

Yeah, :help line-continuation in Neovim says nothing about it either 🤔