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

How to use "textobj_select" ? #130

Closed kay-adamof closed 2 years ago

kay-adamof commented 2 years ago

@RRethy

I tried to use "textobj_select" but the result is not what I was expected. I guess that command works as selecting all the occurrences related a word under the cursor but it selected only one word under the cursor. I wonder it works right.

Are you able to show me an example of how it works?

here is just my settings:

-- init.lua
vim.cmd [[packadd packer.nvim]]
packer.startup(function(use)
  use 'wbthomason/packer.nvim'
  use "RRethy/vim-illuminate"
end)
RRethy commented 2 years ago
 it selected only one word under the cursor

That's the intended behaviour. If you want to modify all of the references then you should use vim.lsp.buf.rename or nvim-treesitter's renaming functionality.