aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-11-16 16:27:36 +0000
committerAleksey Kladov <[email protected]>2020-11-16 16:27:36 +0000
commit682dd4dac0cf003998359d5fe8551daa126e50f6 (patch)
treee2e2a0206bc45c6351eb3f6ed8f5b0755d444fb5 /crates
parent789d9ca1d32afd55c7cb8d0db45652048abd7341 (diff)
Prepare to recompute completions on every keystroke
If we set `is_incomplete: true`, VS Code will re-query completions after every keypress.
Diffstat (limited to 'crates')
-rw-r--r--crates/rust-analyzer/src/handlers.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 782797e85..4d1ebf6bf 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -573,7 +573,8 @@ pub(crate) fn handle_completion(
573 .flat_map(|item| to_proto::completion_item(&line_index, line_endings, item)) 573 .flat_map(|item| to_proto::completion_item(&line_index, line_endings, item))
574 .collect(); 574 .collect();
575 575
576 Ok(Some(items.into())) 576 let completion_list = lsp_types::CompletionList { is_incomplete: false, items };
577 Ok(Some(completion_list.into()))
577} 578}
578 579
579pub(crate) fn handle_folding_range( 580pub(crate) fn handle_folding_range(