summaryrefslogtreecommitdiff
path: root/helix-term/src/commands/lsp.rs
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-03-19 23:08:24 +0000
committerPhilipp Mildenberger2023-05-18 19:58:17 +0000
commit8ab6d7be5e1b6f36215820ef616c2a9feb2306fa (patch)
tree8716bbca03440815478c81981b80f792dc830d6a /helix-term/src/commands/lsp.rs
parent1d5d5dab4718b9db40a20037c1cb1edf66f7991a (diff)
Use let else instead of variable and fix some error messages
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Diffstat (limited to 'helix-term/src/commands/lsp.rs')
-rw-r--r--helix-term/src/commands/lsp.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index 9e9639bf..a1bd291c 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -389,7 +389,7 @@ pub fn symbol_picker(cx: &mut Context) {
if futures.is_empty() {
cx.editor
- .set_error("No Language server does support document symbols");
+ .set_error("No configured language server supports document symbols");
return;
}
@@ -433,7 +433,7 @@ pub fn workspace_symbol_picker(cx: &mut Context) {
.collect();
if futures.is_empty() {
- editor.set_error("No Language server does support workspace symbols");
+ editor.set_error("No configured language server supports workspace symbols");
}
async move {
@@ -663,7 +663,7 @@ pub fn code_action(cx: &mut Context) {
if futures.is_empty() {
cx.editor
- .set_error("No Language server does support code actions");
+ .set_error("No configured language server supports code actions");
return;
}
@@ -1043,7 +1043,8 @@ where
},
);
} else {
- cx.editor.set_error("No language server supports {feature}");
+ cx.editor
+ .set_error("No configured language server supports {feature}");
}
}
@@ -1106,7 +1107,7 @@ pub fn goto_reference(cx: &mut Context) {
);
} else {
cx.editor
- .set_error("No language server supports goto-reference");
+ .set_error("No configured language server supports goto-reference");
}
}
@@ -1138,7 +1139,7 @@ pub fn signature_help_impl(cx: &mut Context, invoked: SignatureHelpInvoked) {
// automatically on backspace, trigger characters, etc.
if invoked == SignatureHelpInvoked::Manual {
cx.editor
- .set_error("No language server supports signature-help");
+ .set_error("No configured language server supports signature-help");
}
return;
}
@@ -1269,7 +1270,8 @@ pub fn hover(cx: &mut Context) {
let future = match request {
Some(future) => future,
None => {
- cx.editor.set_error("No language server supports hover");
+ cx.editor
+ .set_error("No configured language server supports hover");
return;
}
};
@@ -1393,7 +1395,7 @@ pub fn rename_symbol(cx: &mut Context) {
}
} else {
cx.editor
- .set_error("No language server supports symbol renaming");
+ .set_error("No configured language server supports symbol renaming");
}
},
)
@@ -1459,7 +1461,7 @@ pub fn select_references_to_symbol_under_cursor(cx: &mut Context) {
Some(future_offset_encoding) => future_offset_encoding,
None => {
cx.editor
- .set_error("No language server supports document-highlight");
+ .set_error("No configured language server supports document-highlight");
return;
}
};