summaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands/lsp.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index ac6a1a21..34ffa529 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -1421,6 +1421,16 @@ pub fn rename_symbol(cx: &mut Context) {
let (view, doc) = current_ref!(cx.editor);
+ if doc
+ .language_servers_with_feature(LanguageServerFeature::RenameSymbol)
+ .next()
+ .is_none()
+ {
+ cx.editor
+ .set_error("No configured language server supports symbol renaming");
+ return;
+ }
+
let language_server_with_prepare_rename_support = doc
.language_servers_with_feature(LanguageServerFeature::RenameSymbol)
.find(|ls| {