erlang_ls icon indicating copy to clipboard operation
erlang_ls copied to clipboard

Add support for Prepare Rename Request

Open vihu opened this issue 3 years ago • 0 comments

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

vihu avatar Jul 31 '22 17:07 vihu