Unnamed repository; edit this file 'description' to name the repository.
minor : Fix duplicate snippets showing up on hover.
With each `config::apply_change` duplicate configs were being added. Now we first drain the vec that holds these and then start adding.
Ali Bektas 2024-06-24
parent 2fd803c · commit b68200e
-rw-r--r--crates/rust-analyzer/src/config.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index e8504979be..96e377d365 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -844,6 +844,9 @@ impl Config {
config.source_root_parent_map = source_root_map;
}
+ // IMPORTANT : This holds as long as ` completion_snippets_custom` is declared `client`.
+ config.snippets = vec![];
+
let snips = self.completion_snippets_custom().to_owned();
for (name, def) in snips.iter() {