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

Add support for Prepare Rename Request #1353

Closed
vihu opened this issue Jul 31, 2022 · 0 comments · Fixed by #1384
Closed

Add support for Prepare Rename Request #1353

vihu opened this issue Jul 31, 2022 · 0 comments · Fixed by #1384

Comments

@vihu
Copy link

vihu commented Jul 31, 2022

Is your feature request related to a problem? Please describe.
Prepare Rename Request was introduced in LSP ver. 3.12.0 and editors such as neovim have started to use it for project-wide renaming with LSP. It would be nice to support it.

Describe the solution you'd like
As far as I can tell, the solution would be to add a new provider module els_prepare_rename_provider.erl which would largely mimic els_rename_provider except that instead of returning {response, WorkspaceEdits}, it should return the following result type (taken from the LSP spec):

Range | { range: Range, placeholder: string } | { defaultBehavior: boolean } | null

Describe alternatives you've considered
We could potentially force editors to use rename instead of prepareRename locally but that seems like an ugly hack instead of aiming to be at feature parity with the LSP spec.

Additional context

image

plux added a commit to plux/erlang_ls that referenced this issue Sep 26, 2022
plux added a commit to plux/erlang_ls that referenced this issue Sep 26, 2022
plux added a commit to plux/erlang_ls that referenced this issue Sep 26, 2022
plux added a commit to plux/erlang_ls that referenced this issue Sep 26, 2022
plux added a commit to plux/erlang_ls that referenced this issue Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant