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.23k stars 53 forks source link

[Question] Highlight except unused variables/functions #189

Closed lan1812783 closed 10 months ago

lan1812783 commented 10 months ago

When my cursor is on an unused variable, I can barely see what text is underneath it because illuminate is highlighting the variable, here is an example: with cursor For comparison, this is what it looks like without the cursor: Without cursor My question is how can I configure illuminate to not highlight unused variables/functions? I know there is 'min_count_to_highlight' config and I could change it to 2 instead of 1 by default, but it would be nice if I needn't to change that.

RRethy commented 10 months ago

You can change the hlgroup being used, the default is just an underline which means you've already changed the hlgroup (or your colorscheme). Adding an additional LSP call would slow the plugin down for minimal return, additionally as you said there is a simple config fix for that specific use-case.