aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/handlers/completion.rs
diff options
context:
space:
mode:
authornkitsaini2024-02-19 12:58:17 +0000
committerGitHub2024-02-19 12:58:17 +0000
commit787cc36092a5d1a575697287d1d6ba08336a8a96 (patch)
treeafafdd3159bf59657da4199bd44ac7cbe9f4384d /helix-term/src/handlers/completion.rs
parentebf155d6351a84dec010447af88b8246103537da (diff)
fix LSP ComplitionTriggerKind value for `TriggerKind::Auto` (#9660)
Diffstat (limited to 'helix-term/src/handlers/completion.rs')
-rw-r--r--helix-term/src/handlers/completion.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/helix-term/src/handlers/completion.rs b/helix-term/src/handlers/completion.rs
index d71fd24f..491ca563 100644
--- a/helix-term/src/handlers/completion.rs
+++ b/helix-term/src/handlers/completion.rs
@@ -221,9 +221,17 @@ fn request_completion(
.iter()
.find(|&trigger| trigger_text.ends_with(trigger))
});
- lsp::CompletionContext {
- trigger_kind: lsp::CompletionTriggerKind::TRIGGER_CHARACTER,
- trigger_character: trigger_char.cloned(),
+
+ if trigger_char.is_some() {
+ lsp::CompletionContext {
+ trigger_kind: lsp::CompletionTriggerKind::TRIGGER_CHARACTER,
+ trigger_character: trigger_char.cloned(),
+ }
+ } else {
+ lsp::CompletionContext {
+ trigger_kind: lsp::CompletionTriggerKind::INVOKED,
+ trigger_character: None,
+ }
}
};