about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvsrs <vit@conrlab.com>2023-07-18 17:58:51 +0700
committervsrs <vit@conrlab.com>2023-07-18 17:58:51 +0700
commit7f29f016f3330b12b41f313c2b724063a2bd23d4 (patch)
tree74ab2624924857561e6f171986e0b8bf58beb430
parent3468b093bd01e2cebba7964b48c9cef9ceb9e70b (diff)
downloadrust-7f29f016f3330b12b41f313c2b724063a2bd23d4.tar.gz
rust-7f29f016f3330b12b41f313c2b724063a2bd23d4.zip
Add docs
-rw-r--r--docs/user/manual.adoc23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc
index 31035c4b729..6d9234538d1 100644
--- a/docs/user/manual.adoc
+++ b/docs/user/manual.adoc
@@ -952,6 +952,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.