Apply show_completions_on_input: false to word & snippet completions (#44021)

Closes #43408

Previously, we checked the setting inside `is_completion_trigger()`,
which only affects LSP completions. This was ok because user-defined
snippets were tacked onto LSP completions. Then #42122 and #42398 made
snippet completions their own thing, similar to word completions,
surfacing #43408. This PR moves the settings check into
`open_or_update_completions_menu()` so it applies to all completions.

Release Notes:

- Fixed setting `show_completions_on_input: false` so that it affects
word and user-defined snippet completions as well as LSP completions
This commit is contained in:
Andrew Farkas
2025-12-02 21:33:41 +00:00
committed by GitHub
parent a2ddb0f1cb
commit 96a917091a
6 changed files with 18 additions and 30 deletions
@@ -559,7 +559,6 @@ impl CompletionProvider for ConsoleQueryBarCompletionProvider {
position: language::Anchor,
text: &str,
trigger_in_words: bool,
menu_is_open: bool,
cx: &mut Context<Editor>,
) -> bool {
let mut chars = text.chars();
@@ -570,9 +569,6 @@ impl CompletionProvider for ConsoleQueryBarCompletionProvider {
};
let snapshot = buffer.read(cx).snapshot();
if !menu_is_open && !snapshot.settings_at(position, cx).show_completions_on_input {
return false;
}
let classifier = snapshot
.char_classifier_at(position)