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

Stopped working suddenly #42

Closed sefechit closed 4 years ago

sefechit commented 4 years ago

Hello, The plugin just stopped working (I think after downloading python syntax plugins), are you familiar with the problem?

Thanks in advance

RRethy commented 4 years ago

Does it not work for all filetypes? Did your colorscheme change? What happens when you run hi illuminatedWord cterm=underline gui=underline.

sefechit commented 4 years ago

Fixed it, your suggestion helped me. Thank you for your time!

jberryman commented 4 years ago

@RRethy hm, I have that line in my vimrc already. It seems like I have to run that manually to get it working though. Any ideas?

RRethy commented 4 years ago

Interesting, I'm able to reproduce now. It seems somewhere between init.vim gets loaded (and illuminatedWord is defined), it gets cleared (hi illuminatedWord will say illuminatedWord xxx cleared). Seems to be related to this closed nvim issue. Any highlight group defined in your init.vim gets cleared.

A quick hack for this would be to create a file ~/.config/nvim/after/plugin/illuminate_hack.vim that has one line:

hi illuminatedWord cterm=underline gui=underline

This will be loaded after so it won't be cleared. Maybe tn I'll implement a variable that takes highlight values and define the highlight group myself in the plugin to circumvent this issue.