Skip to content
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

Support textDocument/prepareRename #3093

Closed
archseer opened this issue Jul 18, 2022 · 1 comment · Fixed by #6103
Closed

Support textDocument/prepareRename #3093

archseer opened this issue Jul 18, 2022 · 1 comment · Fixed by #6103
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements

Comments

@archseer
Copy link
Member

There's a textDocument/prepareRename if the server supports it. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_prepareRename

It will return the offsets of the string we're renaming: https://github.com/emacs-lsp/lsp-mode/blob/6157b3dde2c56f734a0789225240c521acdf2c7c/lsp-mode.el#L5849-L5871=

@archseer archseer added C-enhancement Category: Improvements A-language-server Area: Language server client labels Jul 18, 2022
@artempyanykh
Copy link
Contributor

+1 to this. Renaming in Marksman is really painful without the client doing prepareRename because the symbols can contain whitespace and all sorts of punctuation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants