Skip to content

Commit

Permalink
fix: 18814
Browse files Browse the repository at this point in the history
  • Loading branch information
alibektas committed Jan 3, 2025
1 parent b4f865a commit fc3e0a1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,18 @@ impl Config {

patch_old_style::patch_json_for_outdated_configs(&mut json);

let mut json_errors = vec![];
let snips = get_field_json::<FxHashMap<String, SnippetDef>>(
&mut json,
&mut json_errors,
"completion_snippets_custom",
None,
)
.unwrap_or(self.completion_snippets_custom().to_owned());

// 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() {
if def.prefix.is_empty() && def.postfix.is_empty() {
continue;
Expand Down

0 comments on commit fc3e0a1

Please sign in to comment.