Skip to content

Commit f6eba28

Browse files
committed
Adjust config name
1 parent dd4b534 commit f6eba28

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,10 @@ config_data! {
301301
/// Internal config, path to proc-macro server executable (typically,
302302
/// this is rust-analyzer itself, but we override this in tests).
303303
procMacro_server: Option<PathBuf> = "null",
304-
/// Replaces the proc-macro expanders for the named proc-macros in the named crates with
305-
/// an identity expander that outputs the input again.
306-
procMacro_dummies: FxHashMap<Box<str>, Box<[Box<str>]>> = "{}",
304+
/// These proc-macros will be ignored when trying to expand them.
305+
///
306+
/// This config takes a map of crate names with the exported proc-macro names to ignore as values.
307+
procMacro_ignored: FxHashMap<Box<str>, Box<[Box<str>]>> = "{}",
307308

308309
/// Command to be executed instead of 'cargo' for runnables.
309310
runnables_overrideCargo: Option<String> = "null",
@@ -720,7 +721,7 @@ impl Config {
720721
Some((path, vec!["proc-macro".into()]))
721722
}
722723
pub fn dummy_replacements(&self) -> &FxHashMap<Box<str>, Box<[Box<str>]>> {
723-
&self.data.procMacro_dummies
724+
&self.data.procMacro_ignored
724725
}
725726
pub fn expand_proc_attr_macros(&self) -> bool {
726727
self.data.experimental_procAttrMacros

docs/user/generated_config.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,12 @@ Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScri
455455
Internal config, path to proc-macro server executable (typically,
456456
this is rust-analyzer itself, but we override this in tests).
457457
--
458-
[[rust-analyzer.procMacro.dummies]]rust-analyzer.procMacro.dummies (default: `{}`)::
458+
[[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
459459
+
460460
--
461-
Replaces the proc-macro expanders for the named proc-macros in the named crates with
462-
an identity expander that outputs the input again.
461+
These proc-macros will be ignored when trying to expand them.
462+
463+
This config takes a map of crate names with the exported proc-macro names to ignore as values.
463464
--
464465
[[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
465466
+

editors/code/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@
880880
"string"
881881
]
882882
},
883-
"rust-analyzer.procMacro.dummies": {
884-
"markdownDescription": "Replaces the proc-macro expanders for the named proc-macros in the named crates with\nan identity expander that outputs the input again.",
883+
"rust-analyzer.procMacro.ignored": {
884+
"markdownDescription": "These proc-macros will be ignored when trying to expand them.\n\nThis config takes a map of crate names with the exported proc-macro names to ignore as values.",
885885
"default": {},
886886
"type": "object"
887887
},

0 commit comments

Comments
 (0)