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.12k stars 44 forks source link

Can't move to next with the lsp provider #140

Closed YangEfei closed 1 year ago

YangEfei commented 1 year ago

Describe the bug When I use ccls as the lsp provider, <a-n> can only move to the word which include in the current block. And <a-p> can move anywhere, no matter it's in the block or not. And if I change it to the lower priority than treesitter, it works correctly. I'm not sure whether this problem is caused by ccls (lsp support for c++) or this project.

To Reproduce The example code in cpp:

  if (a == 0) {
    a++;
  } else if (a > 1) {
    a = 0;
  }
  1. If my cursor is on the first a, and I type <a-n> will go to the a++ in the next row.
  2. Type <a-n> again, it can't move to the other condition branch.
  3. If I type <a-p>, it can move to previous, and repeat it some times, the cursor can move to the last a = 0, and move back to the first a at last.

Note Omitting a minimal init.vim/init.lua/.vimrc will likely result in the issue being closed without explanation.

Output from :IlluminateDebug

Expected behavior

has the same behavior as . For example, it can move to any `a` in the example above when I type `` on the variable `a`. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
RRethy commented 1 year ago

Closing because the issue template was ignored.