smjonas / inc-rename.nvim

Incremental LSP renaming based on Neovim's command-preview feature.
MIT License
637 stars 8 forks source link

Question about multiple buffers renaming #52

Closed pidgeon777 closed 4 months ago

pidgeon777 commented 5 months ago

I've a question, what if the LSP rename action involves updating references in buffers different from the actual one?

It would be nice to have a preview of the changes which would be applied to the other buffers (opened or not). Would something like that possible?

xzbdmw commented 5 months ago

Ideally a diff view showing all related files is better, I also want something similar in community

pidgeon777 commented 5 months ago

Maybe this library could be used, if or when supporting diff mode:

https://www.reddit.com/r/neovim/comments/1bkb981/introducing_nuicomponents_a_library_that/

xzbdmw commented 5 months ago

So cool, I’ll try to integrate it, there are many ideas comes up!

smjonas commented 5 months ago

Hi, did you know that inc-rename can already show additional info about the files when renaming variables across multiple files? The split window will be shown if you set :set inccommand=split. image

xzbdmw commented 5 months ago

Hi, did you know that inc-rename can already show additional info about the files when renaming variables across multiple files? The split window will be shown if you set :set inccommand=split. image

Didn't know that!

smjonas commented 5 months ago

Didn't know that!

I will add a note to the readme to make more users aware of this feature. However, while testing it, I noticed some buggy highlights which I will fix first.