Repository navigation
fix: Send didRenameFiles notifications to any language server that su… - #1223
Conversation
|
@bzoracler is there any chance that you try this PR to check that it doesn't break the rename files support |
| } | ||
|
|
||
| context.renameFilesParams() | ||
| .forEach((ls, params) -> ls.getWorkspaceService().didRenameFiles(params)); |
There was a problem hiding this comment.
Please keep serverWrapper.sendNotification which uses a proper Thread pooling to send notification.
There was a problem hiding this comment.
tu, fixed, please review
There was a problem hiding this comment.
Thanks!
Before merging this PR I would like that @bzoracler can test it but ihe is blocked with #1224 that I ,am trying to fix it.
More as rename files is not trivial Ithink we should have tests for that.
If you have time ro work on it it would be fantastic but I know it is not a trivial issue.
There was a problem hiding this comment.
@sergeysavchuk I did a fix and merge the PR, could you rebase your PR from main please.
There was a problem hiding this comment.
@angelozerr can you trigger the plugin build workflows please
There was a problem hiding this comment.
@sergeysavchuk do you think you could work on tests? If yes, we can doo that in a separate PR.
|
@angelozerr This may take a while - last LSP4IJ version that worked properly with my server was v12.0. After v12.0, When I start PyCharm, the only |
If I understand correctly, after v12.0 LSP4IJ is unusable for you, you have none didOpen, didClose (I mean just open and close file inside IntelliJ without renaming file). Is that? |
|
@bzoracler could you tell me which language server are you using please. |
Almost. After v12.0, once I start PyCharm, The trace is this: After this, there are no more I'll try to produce a minimum working example, the server itself is not published and is quite complicated to set up. I'm trying to see whether I assumed something on my end that broke when LSP4IJ updated. |
|
@angelozerr see minimal reproduction at #1224 |
…pports it, regardless of willRenameFiles support or execution status (redhat-developer#1216)
…g to send notification
1b8c320 to
8462772
Compare
|
@sergeysavchuk I have seen in a comment that you have tried clojure-lsp, it is very nice. It would be very nice if you could test with other language server like TypeScript, Go, Clangd (don't remember which servers supports rename files). With LSP4IJ it should be super easy since it provide LSP template for that and even installer. For instance you need just to create a test.ts file or test.c file (test.go but you will need to install Go runtime before) and you should see an editor notification on the top of the editor which prompote the installation of the language server. If you click on it it will open the New language server dialog and you will just need to click on OK. Installation should be done automaticly. |
|
@angelozerr I just tested this, and the changes don't negatively affect my language server (which currently relies solely on renaming triggering |
Thanks for your feedback! I need to find time to test it with other language servers. @sergeysavchuk if you have time to do that it would be nice otherwise I need to find time to do that in order to merge the PR. |
|
@angelozerr I’ll try to test it today, but it would be better if you could also test since I still need to get familiar with other language servers. |
Yes sure! |
|
I have tested with TypeScript LS and Clojure LSP and it seems working pretty well. Your PR breaks nothings, Thanks! For tests I will try to write something. |
|
@angelozerr Thanks a lot for such quick feedback and for testing. clojure_lsp_didRenameFiles.mov |
Send didRenameFiles notifications to any language server that supports it, regardless of willRenameFiles support or execution status. Previously, didRenameFiles was only sent to servers that supported and successfully executed willRenameFiles.
Fixes #1216