aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/completion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r--helix-term/src/ui/completion.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index c7f9250d..e0614722 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -144,7 +144,9 @@ impl Completion {
}
};
- let Some(range) = util::lsp_range_to_range(doc.text(), edit.range, offset_encoding) else{
+ let Some(range) =
+ util::lsp_range_to_range(doc.text(), edit.range, offset_encoding)
+ else {
return Transaction::new(doc.text());
};
@@ -413,10 +415,18 @@ impl Completion {
_ => return false,
};
- let Some(language_server) = cx.editor.language_server_by_id(current_item.language_server_id) else { return false; };
+ let Some(language_server) = cx
+ .editor
+ .language_server_by_id(current_item.language_server_id)
+ else {
+ return false;
+ };
// This method should not block the compositor so we handle the response asynchronously.
- let Some(future) = language_server.resolve_completion_item(current_item.item.clone()) else { return false; };
+ let Some(future) = language_server.resolve_completion_item(current_item.item.clone())
+ else {
+ return false;
+ };
cx.callback(
future,