Skip to content

Commit

Permalink
fix LSP ComplitionTriggerKind value for TriggerKind::Auto (#9660)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkitsaini authored Feb 19, 2024
1 parent ebf155d commit 787cc36
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 787cc36

Please sign in to comment.