Closed haolian9 closed 2 years ago
Hi, I have implemented something like what you described in https://github.com/nvim-treesitter/nvim-treesitter-refactor/pull/22.
I have tested it, really nice, highlight works more fluent now. :thumbsup:
I left some comments on that pr without permission, sorry for my rude. @stsewd
after all those days use, i found i did not need a smart or automatic definition highlighter, so I added some options to nvim-treesitter-refactor.highlight_definitions
i made a commit to implement it in my fork.
as now, every time CursorMoved, refactor.highlight_usages will clear_usage_highlights(); this behavior is fine, except when the cursor moves among same
usage node
(i dont known the exact name to describe it), let's consider the following type flow:refactor.navigation.goto_next_usage
or goto_previous_usage or justhl
in the keywordit is very inefficient, and highlight blinks (unless set &updatetime a small value) leads a bad experience.
can we keep the highlight highlighting when the usage node has not changed after cursor moved.