smjonas / inc-rename.nvim

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

refactor!: remove multifile_strategy (this is now supported by Neovim natively) #16

Closed smjonas closed 2 years ago

smjonas commented 2 years ago

Highlights across multiple buffers are now cleared by Neovim automatically so providing a separate multifile option is no longer necessary: https://github.com/neovim/neovim/pull/19360

Will be merged in four weeks from now (September 16) once tested and people have had a chance to upgrade their nightly version.

smjonas commented 2 years ago

@RaafatTurki Could you test-drive this branch for a while (if you already use the latest Nvim version)? :) I have already been using it and there don't seem to be any issues.

RaafatTurki commented 2 years ago

Hey again ;) This branch has introduced a variety of issues within various lsp servers, the issues are most likely byproducts of a couple of bugs

gopls and clang

  1. the highlight sticks around after renaming
  2. pressing esc doesn't abort renaming
  3. renaming across files is broken

gopls

  1. the error: [inc-rename] Error while renaming: old and new names are the same: shows even when the old and new names are different.

clang

  1. the error: [inc-rename] Error while renaming: Cannot rename symbol: new name is the same as the old name shows even when the old and new names are different.

sumneko_lua

  1. pressing esc doesn't abort renaming

I've tested everything with the dressing.nvim implementation. nvim version: NVIM v0.8.0-dev-900-g0d0a336c5 I've built it from source today.

smjonas commented 2 years ago

Damn, thanks for the great feedback as always, that really helps a lot! Since I have mostly used the :IncRename command, I probably wouldn't have noticed these issues... I have started working on a rewrite of the dressing.nvim implementation because the current one has issues and we seem to have missed them until #17 was reported😅 that requires a change to dressing.nvim so it may take a while until that's done. Hopefully that will also fix the issues you reported.