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

text object for the highlighted phrase #80

Closed tydra-wang closed 1 year ago

tydra-wang commented 2 years ago

Feature request!

I'm using neovim lspconfig with illuminate. It works well, but I am wondering if iluuminate can provide a text object for the highlighed phrase.

For example:

func myfunc() (io.Reader, error)

When I put cursor on io.Reader, it's highlighted. It would be excellent if I can use something like cix when I want to change it to *tar.Reader !

RRethy commented 2 years ago

Interesting, I'd be open to adding this. I'm open to PRs if you can't wait, otherwise when I have time this month I'll try to prototype it out.