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

CursorHold instead of CursorMoved #77

Closed poetaman closed 3 years ago

poetaman commented 3 years ago

Please add a setting to use CursorHold instead of CursorMoved. That way a user can get a word's matches illuminated only if the cursor stabilizes on a word. IMO this should improve scroll performance, as it won't trigger drawing when cursor is moving around.

RRethy commented 3 years ago

Using CursorHold is almost always the wrong choice for a plugin since it's configured via :h 'updatetime' which defaults to 4seconds. You can configure the delay with :h g:Illuminate_delay which defaults to 0ms. Also, this plugin shouldn't have much of an impact if any on scrolling performance, it might be a red herring if you are feeling that scrolling is slow.