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.19k stars 50 forks source link

Feature request: Highlight the match under the cursor differently than other matches #150

Closed scottchiefbaker closed 1 year ago

scottchiefbaker commented 1 year ago

I'm stuck on Vim 7.4 on a couple of servers so the delay feature isn't available to me. When I'm scrolling through a file with a lot of matches, vim-illuminate highlights ALL of them. Since delay is essentially 0ms it ends up highlighting/de-highlighting lots of words really quickly. This can make it easy to lose where the actual cursor is.

It would be very helpful if the match under the cursor (primary match?) could be one color, and all the other matches on the screen a secondary color. This would allow me to keep an eye on where the cursor is when scrolling rapidly through a file.

RRethy commented 1 year ago

From the README (let me know if I misinterpreting the request):

Lastly, you can also specify a specific highlight for the word under the cursor so it differs from all other matches using the following higlight group:

augroup illuminate_augroup
    autocmd!
    autocmd VimEnter * hi illuminatedCurWord cterm=italic gui=italic
augroup END
scottchiefbaker commented 1 year ago

Yes this is exactly what I wanted. I dunno how I missed it in the documentation. I swear I read it before I opened the bug, but somehow I missed it.

Thanks for an EXCELLENT Vim plugin.

Zwlin98 commented 9 months ago

It seems that illuminatedCurWord is not working in Neovim.