-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Prefill rename dialog with current symbol name #106
Comments
I implemented this a while back in ade065d. The language server must support the prepareRename request. You can test this out with the Eclipse Ruby integration for example. 😉 |
In theory yes, practically not really as it does not even seem to work for typescript files in Wild Web Developer, so either the adoption rate of prepareRename request in language servers is low or something is still broken. |
The typescript-language-server used by Wild Web Developer is not a very hot project. As VSCode and most "official" TypeScript tools to directly rely on tsserver (which does not support LSP microsoft/TypeScript#39459 ), the typescript-language-server doesn't really catch on as fast and misses some features of LSP. |
Ok, thanks for the explanation. |
The RenameCapabilities configured in LanguageServerWrapper are not indicating support for prepareRename. That's why the rename dialog is not prefilled. This however is required by the spec, see https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/ /**
* The server provides rename support. RenameOptions may only be
* specified if the client states that it supports
* `prepareSupport` in its initial `initialize` request.
*/
renameProvider?: boolean | RenameOptions; |
Thanks @sebthom . Do you plan to provide a PR for that? |
When using ALT+SHIFT+R to rename e.g. a field or method, the rename dialog does not prefill the current name nor has any context information on what is going to be renamed:
![image](https://user-images.githubusercontent.com/426959/163624320-84f1a553-3dc6-4e7f-89f3-bcb9973d33c2.png)
It would be nice to have the current name in the New Name field as default instead of the
newName
placeholder.The text was updated successfully, but these errors were encountered: