lsp4intellij icon indicating copy to clipboard operation
lsp4intellij copied to clipboard

Renaming a file

Open payne911 opened this issue 2 years ago • 2 comments
trafficstars

I'm not entirely sure, but it doesn't seem like lsp4intellij appropriately handles the case where someone renames a class which has an associated file name. It seems to send the didChange notifications to modify the text references in different files, but it won't be able to track new changes done in that file since the textDocument key is now changed. I'm not an LSP expert, but given the file was opened in IntelliJ, shouldn't this trigger a didClose on the old file name, and a didOpen on the new one?

payne911 avatar Aug 25 '23 20:08 payne911

Probably it should send workspace/didRenameFiles (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didRenameFiles)

nixel2007 avatar Aug 25 '23 23:08 nixel2007

Does this library support this already? I can only find references to textDocument/rename (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_rename), which I'm not sure if it does the same thing.

payne911 avatar Oct 31 '23 15:10 payne911