Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/config.rs24
-rw-r--r--docs/book/src/configuration_generated.md10
-rw-r--r--editors/code/package.json25
3 files changed, 57 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 409f2468a7..015e6df96f 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -380,8 +380,6 @@ config_data! {
/// The number of worker threads in the main loop. The default `null` means to pick
/// automatically.
numThreads: Option<NumThreads> = None,
- /// The number of proc-macro-srv processes
- proc_macro_processes: NumProcesses = NumProcesses::Concrete(1),
/// Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
procMacro_attributes_enable: bool = true,
@@ -392,6 +390,12 @@ config_data! {
/// Internal config, path to proc-macro server executable.
procMacro_server: Option<Utf8PathBuf> = None,
+ /// Number of proc-macro server processes to spawn.
+ ///
+ /// Controls how many independent `proc-macro-srv` processes rust-analyzer
+ /// runs in parallel to handle macro expansion.
+ proc_macro_processes: NumProcesses = NumProcesses::Concrete(1),
+
/// The path where to save memory profiling output.
///
/// **Note:** Memory profiling is not enabled by default in rust-analyzer builds, you need to build
@@ -3920,6 +3924,22 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
},
],
},
+ "NumProcesses" => set! {
+ "anyOf": [
+ {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 255
+ },
+ {
+ "type": "string",
+ "enum": ["physical"],
+ "enumDescriptions": [
+ "Use the number of physical cores",
+ ],
+ },
+ ],
+ },
"Option<NumThreads>" => set! {
"anyOf": [
{
diff --git a/docs/book/src/configuration_generated.md b/docs/book/src/configuration_generated.md
index c4124aaae0..d3f41fb152 100644
--- a/docs/book/src/configuration_generated.md
+++ b/docs/book/src/configuration_generated.md
@@ -1325,6 +1325,16 @@ Default: `null`
Internal config, path to proc-macro server executable.
+## rust-analyzer.proc.macro.processes {#proc.macro.processes}
+
+Default: `1`
+
+Number of proc-macro server processes to spawn.
+
+Controls how many independent `proc-macro-srv` processes rust-analyzer
+runs in parallel to handle macro expansion.
+
+
## rust-analyzer.profiling.memoryProfile {#profiling.memoryProfile}
Default: `null`
diff --git a/editors/code/package.json b/editors/code/package.json
index 0d91378706..a1266c4a67 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -2784,6 +2784,31 @@
}
},
{
+ "title": "Proc",
+ "properties": {
+ "rust-analyzer.proc.macro.processes": {
+ "markdownDescription": "Number of proc-macro server processes to spawn.\n\nControls how many independent `proc-macro-srv` processes rust-analyzer\nruns in parallel to handle macro expansion.",
+ "default": 1,
+ "anyOf": [
+ {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 255
+ },
+ {
+ "type": "string",
+ "enum": [
+ "physical"
+ ],
+ "enumDescriptions": [
+ "Use the number of physical cores"
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
"title": "Profiling",
"properties": {
"rust-analyzer.profiling.memoryProfile": {