diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-16 18:03:39 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-16 18:03:39 +0100 |
commit | 4759a39f06be1ec1469101a8aac39039b8743806 (patch) | |
tree | 08d6b69c74e90498861c2811536e71ddce4bf2d9 /docs/user | |
parent | 081596dd584ac39fbfa6a7e47dfe9dd4a58c362a (diff) | |
parent | 5226e886b04cc4db9fce841b84bd972d58b31bef (diff) |
Merge #5407
5407: Mentioned problem matchers and running cargo-watch as a VS Code Task r=matklad a=Michael-F-Bryan
See https://github.com/rust-analyzer/rust-analyzer/issues/3596#issuecomment-658887055.
Co-authored-by: Michael-F-Bryan <[email protected]>
Co-authored-by: Michael Bryan <[email protected]>
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/manual.adoc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index 7fab7237b..978b463d5 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -373,3 +373,22 @@ Or it is possible to specify vars more granularly: | |||
373 | ``` | 373 | ``` |
374 | 374 | ||
375 | You can use any valid RegExp 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. | 375 | You can use any valid RegExp 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. |
376 | |||
377 | ==== Compiler feedback from external commands | ||
378 | |||
379 | 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. | ||
380 | |||
381 | To do this you need to create a new https://code.visualstudio.com/docs/editor/tasks[VS Code Task] and set `rust-analyzer.checkOnSave.enable: false` in preferences. | ||
382 | |||
383 | For example, if you want to run https://crates.io/crates/cargo-watch[`cargo watch`] instead, you might add the following to `.vscode/tasks.json`: | ||
384 | |||
385 | ```json | ||
386 | { | ||
387 | "label": "Watch", | ||
388 | "group": "build", | ||
389 | "type": "shell", | ||
390 | "command": "cargo watch", | ||
391 | "problemMatcher": "$rustc-watch", | ||
392 | "isBackground": true | ||
393 | } | ||
394 | ``` | ||