Fix the completions being too slow (#19013)

Closes https://github.com/zed-industries/zed/issues/19005

Release Notes:

- Fixed completion items inserted with a delay
([#19005](https://github.com/zed-industries/zed/issues/19005))

---------

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Kirill Bulatov 2024-10-10 12:53:02 +03:00 committed by GitHub
parent f6f5ad138d
commit 5841ac406d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 65 additions and 145 deletions

View file

@ -387,7 +387,7 @@ mod test {
lsp::ServerCapabilities {
completion_provider: Some(lsp::CompletionOptions {
trigger_characters: Some(vec![".".to_string(), ":".to_string()]),
resolve_provider: Some(false),
resolve_provider: Some(true),
..Default::default()
}),
..Default::default()
@ -432,9 +432,7 @@ mod test {
request.next().await;
cx.condition(|editor, _| editor.context_menu_visible())
.await;
cx.simulate_keystrokes("down enter");
cx.run_until_parked();
cx.simulate_keystrokes("! escape");
cx.simulate_keystrokes("down enter ! escape");
cx.assert_state(
indoc! {"