fix LSP ComplitionTriggerKind value for `TriggerKind::Auto` (#9660)

pull/9667/head
nkitsaini 9 months ago committed by GitHub
parent ebf155d635
commit 787cc36092
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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,
}
}
};

Loading…
Cancel
Save