Auto merge of #17488 - alibektas:17485/duplicate_snippets, r=alibektas

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. This fixes #17485
This commit is contained in:
bors 2024-06-24 11:34:13 +00:00
commit a35422a750

View file

@ -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.clear();
let snips = self.completion_snippets_custom().to_owned();
for (name, def) in snips.iter() {