Skip to content

Commit

Permalink
fix LSP ComplitionTriggerKind value for TriggerKind::Auto
Browse files Browse the repository at this point in the history
  • Loading branch information
nkitsaini committed Feb 19, 2024
1 parent 6432669 commit 7631308
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions helix-term/src/handlers/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
};

Expand Down

0 comments on commit 7631308

Please sign in to comment.