diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-01-03 13:52:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-03 13:52:09 +0000 |
| commit | 981645b16054f91de26df2e2c7b067b18248f351 (patch) | |
| tree | 4805803ea22e10357463a50a22be5b2a9d32df8a | |
| parent | 9b0aa8e67d6aa587136aff36d6b3cff41fa9a76b (diff) | |
| parent | fc3e0a15df15d63a8c44909031fb618a16a8558c (diff) | |
| download | rust-981645b16054f91de26df2e2c7b067b18248f351.tar.gz rust-981645b16054f91de26df2e2c7b067b18248f351.zip | |
Merge pull request #18830 from alibektas/18814
fix: 18814
| -rw-r--r-- | src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs index f054bde903d..35987ebea3d 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs @@ -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; |
