How's my eglot-rename-file function? #1396
Replies: 2 comments 1 reply
-
I don't know if didRenameFiles implies didClose |
Beta Was this translation helpful? Give feedback.
-
So, using this for a while, there's some issues with it. Might be obvious to @joaotavora ? One: I have to revert the file in order for the lsp server to recognize that the new file is open. I'm not sure why this is, since I send the rename commands, and, the "didOpen" event is sent automatically for the new file. Two: renames when a path is changed don't update the file itself (i.e. fix typescript relative imports), like happens in vs-code. But, overall, this has been super useful. I'll update it as I have fixes. Perhaps one day we can get this functionality in to eglot. |
Beta Was this translation helpful? Give feedback.
-
This is my first time working with eglot internals so I'm probably abusing things and doing it wrong. I'm pretty inexperienced with lsp in general.
Anyways, I really wanted typescript rename-files support in eglot so I had one less reason to open vs-code. Turns out the lsp server supports the WillRenameFiles command.
Here's my code:
Please roast it.
Beta Was this translation helpful? Give feedback.
All reactions