Replies: 2 comments 4 replies
-
Could theoretically be implemented:
But both approaches are very laborious. I certainly won't work on this, and I don't think it should be part of core Eglot. Maybe that elusive |
Beta Was this translation helpful? Give feedback.
1 reply
-
For later reference, IntelliJ's rename UI mentioned seems to be depicted here: https://www.jetbrains.com/help/idea/rename-refactorings.html#inplace_rename @cowboyd Do you remember what happens to the occurrences outside of the current viewport? Are they renamed silently? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Like most folks, I use
eglot-rename
all the time and love it. However, one thing I do miss from my IntelliJ days is the way that the editor highlighted every occurrence of the variable and showed multiple cursors operating on the document at once as you played with the new name. It's just such a pleasant interaction that lets you see how it will look everywhere before you actually commit.I assume that the primary reason that this is done in a "modal" fashion is because it isn't actually the editor that is making the changes to the document, but instead it is the LSP server. However, given that it is a very reliable function, how hard would it be to make the edits in multiple places in real time, and only reset the document back to the old state in the event that the edits failed?
Again, the current functionality is just fine, and it works in exactly the same way that VSCode does today. However, the IntelliJ method was simply delightful. Is there a way this sort of "optimistic" editing could be made pluggable?
Beta Was this translation helpful? Give feedback.
All reactions