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 uek-1 committed Feb 24, 2024
1 parent 9537258 commit 3a7547b
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 3a7547b

Please sign in to comment.