Unnamed repository; edit this file 'description' to name the repository.
Adjust config name
Lukas Wirth 2022-01-06
parent dd4b534 · commit f6eba28
-rw-r--r--crates/rust-analyzer/src/config.rs9
-rw-r--r--docs/user/generated_config.adoc7
-rw-r--r--editors/code/package.json4
3 files changed, 11 insertions, 9 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index dba772259f..a704139255 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -301,9 +301,10 @@ config_data! {
/// Internal config, path to proc-macro server executable (typically,
/// this is rust-analyzer itself, but we override this in tests).
procMacro_server: Option<PathBuf> = "null",
- /// Replaces the proc-macro expanders for the named proc-macros in the named crates with
- /// an identity expander that outputs the input again.
- procMacro_dummies: FxHashMap<Box<str>, Box<[Box<str>]>> = "{}",
+ /// These proc-macros will be ignored when trying to expand them.
+ ///
+ /// This config takes a map of crate names with the exported proc-macro names to ignore as values.
+ procMacro_ignored: FxHashMap<Box<str>, Box<[Box<str>]>> = "{}",
/// Command to be executed instead of 'cargo' for runnables.
runnables_overrideCargo: Option<String> = "null",
@@ -720,7 +721,7 @@ impl Config {
Some((path, vec!["proc-macro".into()]))
}
pub fn dummy_replacements(&self) -> &FxHashMap<Box<str>, Box<[Box<str>]>> {
- &self.data.procMacro_dummies
+ &self.data.procMacro_ignored
}
pub fn expand_proc_attr_macros(&self) -> bool {
self.data.experimental_procAttrMacros
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 0b9abadf98..f46dda2351 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -455,11 +455,12 @@ Enable support for procedural macros, implies `#rust-analyzer.cargo.runBuildScri
Internal config, path to proc-macro server executable (typically,
this is rust-analyzer itself, but we override this in tests).
--
-[[rust-analyzer.procMacro.dummies]]rust-analyzer.procMacro.dummies (default: `{}`)::
+[[rust-analyzer.procMacro.ignored]]rust-analyzer.procMacro.ignored (default: `{}`)::
+
--
-Replaces the proc-macro expanders for the named proc-macros in the named crates with
-an identity expander that outputs the input again.
+These proc-macros will be ignored when trying to expand them.
+
+This config takes a map of crate names with the exported proc-macro names to ignore as values.
--
[[rust-analyzer.runnables.overrideCargo]]rust-analyzer.runnables.overrideCargo (default: `null`)::
+
diff --git a/editors/code/package.json b/editors/code/package.json
index e7c958050e..d418868474 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -880,8 +880,8 @@
"string"
]
},
- "rust-analyzer.procMacro.dummies": {
- "markdownDescription": "Replaces the proc-macro expanders for the named proc-macros in the named crates with\nan identity expander that outputs the input again.",
+ "rust-analyzer.procMacro.ignored": {
+ "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.",
"default": {},
"type": "object"
},