Skip to content

Commit

Permalink
fix LSP ComplitionTriggerKind value for TriggerKind::Auto (helix-ed…
Browse files Browse the repository at this point in the history
  • Loading branch information
nkitsaini authored and Schuyler Mortimer committed Jul 10, 2024
1 parent a4e7fb8 commit 5660cc9
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 5660cc9

Please sign in to comment.