about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorVictor Song <vms2@rice.edu>2023-09-29 03:49:37 -0500
committerVictor Song <vms2@rice.edu>2023-10-09 02:15:05 -0500
commitaeef7b644b135c80c2fc7a28954d97194df7fabc (patch)
tree79d2733bd93d1b37e92d6cb26d5a16f1dd848757 /editors/code
parent7e9b25bff75a24bd85521ca54fa9d01edd35ad1d (diff)
downloadrust-aeef7b644b135c80c2fc7a28954d97194df7fabc.tar.gz
rust-aeef7b644b135c80c2fc7a28954d97194df7fabc.zip
Add config option to use `rust-analyzer` specific target dir
Adds a Rust Analyzer configuration option to set a custom
target directory for builds. This is a workaround for Rust Analyzer
blocking debug builds while running `cargo check`. This change
should close #6007
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 554b05c46c7..e1402cb0f5c 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1488,6 +1488,21 @@
                         "type": "string"
                     }
                 },
+                "rust-analyzer.rust.analyzerTargetDir": {
+                    "markdownDescription": "Optional path to a rust-analyzer specific target directory.\nThis is useful to prevent rust-analyzer's `cargo check` from blocking builds.\n\nSet to `true` to use a subdirectory of the existing target directory or\nset to a path to use that path.",
+                    "default": null,
+                    "anyOf": [
+                        {
+                            "type": "null"
+                        },
+                        {
+                            "type": "boolean"
+                        },
+                        {
+                            "type": "string"
+                        }
+                    ]
+                },
                 "rust-analyzer.rustc.source": {
                     "markdownDescription": "Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private\nprojects, or \"discover\" to try to automatically find it if the `rustc-dev` component\nis installed.\n\nAny project which uses rust-analyzer with the rustcPrivate\ncrates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.\n\nThis option does not take effect until rust-analyzer is restarted.",
                     "default": null,