about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/docs/user
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2023-08-07 12:03:15 +0300
committerLaurențiu Nicola <lnicola@dend.ro>2023-08-07 12:03:15 +0300
commita42f832312fbaa4a5aa1e4f5ec9f220e1366e5ae (patch)
tree1711a27d46faee4898bc435d83a72e4dd8effecd /src/tools/rust-analyzer/docs/user
parent4a71a05d52a534c18fed8b1415c4858570d8ef86 (diff)
parentbaee6b338b0ea076cd7a9f18d47f175dd2ba0e5d (diff)
downloadrust-a42f832312fbaa4a5aa1e4f5ec9f220e1366e5ae.tar.gz
rust-a42f832312fbaa4a5aa1e4f5ec9f220e1366e5ae.zip
Merge commit 'baee6b338b0ea076cd7a9f18d47f175dd2ba0e5d' into sync-from-ra
Diffstat (limited to 'src/tools/rust-analyzer/docs/user')
-rw-r--r--src/tools/rust-analyzer/docs/user/manual.adoc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/docs/user/manual.adoc b/src/tools/rust-analyzer/docs/user/manual.adoc
index 2cf985adabc..5dafd1a4c8c 100644
--- a/src/tools/rust-analyzer/docs/user/manual.adoc
+++ b/src/tools/rust-analyzer/docs/user/manual.adoc
@@ -949,6 +949,29 @@ Or it is possible to specify vars more granularly:
 You can use any valid regular expression as a mask.
 Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively.
 
+If needed, you can set different values for different platforms:
+```jsonc
+"rust-analyzer.runnables.extraEnv": [
+    {
+        "platform": "win32", // windows only
+        env: {
+             "APP_DATA": "windows specific data"
+        }
+    },
+    {
+        "platform": ["linux"],
+        "env": {
+             "APP_DATA": "linux data",
+        }
+    },
+    { // for all platforms
+        "env": {
+             "APP_COMMON_DATA": "xxx",
+        }
+    }
+]
+```
+
 ==== Compiler feedback from external commands
 
 Instead of relying on the built-in `cargo check`, you can configure Code to run a command in the background and use the `$rustc-watch` problem matcher to generate inline error markers from its output.