Check language server rename support before showing rename-to prompt #6249
Labels
A-language-server
Area: Language server client
C-enhancement
Category: Improvements
E-good-first-issue
Call for participation: Issues suitable for new contributors
E-has-instructions
Call for participation: Has instructions for fixing the issue and opening a PR
If a language server doesn't support LSP renaming,
rename_symbol
(<space>r
) should bail early. Currently it creates the "rename-to" prompt and then fails to rename.We check whether the server declares rename support here when creating the rename request future:
helix/helix-lsp/src/client.rs
Lines 1115 to 1120 in d63e570
(The rename text entered in the prompt is used in the params for that request.) We should extract that match as a function:
and then check that support before creating the prompt.
bash-language-server
is a language server in the wild that doesn't support symbol renaming and can be used to test this.The text was updated successfully, but these errors were encountered: