diff options
| author | Josh McKinney <joshka@users.noreply.github.com> | 2024-03-28 20:39:21 -0700 |
|---|---|---|
| committer | Josh McKinney <joshka@users.noreply.github.com> | 2024-03-28 20:42:44 -0700 |
| commit | 29d28f801cf7cac6a2b80dadfd60f3f6823bc3cf (patch) | |
| tree | 3c05166c97442ea82947c2dcaea6b0bd03992a41 /src/tools/rust-analyzer/.github/rust.json | |
| parent | ab10eea62ec59bc676a946ae8be562edcaccb950 (diff) | |
Make `cargo run` always available for binaries
Previously, items for `cargo test` and `cargo check` would appear as in the `Select Runnable` quick pick that appears when running `rust-analyzer: Run`, but `run` would only appear as a runnable if a `main`` function was selected in the editor. This change adds `cargo run` as an always available runnable command for binary packages. This makes it easier to develop cli / tui applications, as now users can run application from anywhere in their codebase.
Diffstat (limited to 'src/tools/rust-analyzer/.github/rust.json')
| -rw-r--r-- | src/tools/rust-analyzer/.github/rust.json | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/.github/rust.json b/src/tools/rust-analyzer/.github/rust.json new file mode 100644 index 00000000000..ddaa1b0824b --- /dev/null +++ b/src/tools/rust-analyzer/.github/rust.json @@ -0,0 +1,33 @@ +{ + "problemMatcher": [ + { + "owner": "rustfmt", + "severity": "warning", + "pattern": [ + { + "regexp": "^(Diff in (.+)) at line (\\d+):$", + "message": 1, + "file": 2, + "line": 3 + } + ] + }, + { + "owner": "clippy", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[[\\d;]+m)*(warning|warn|error)(?:\\x1b\\[[\\d;]+m)*(\\[(.*)\\])?(?:\\x1b\\[[\\d;]+m)*:(?:\\x1b\\[[\\d;]+m)* ([^\\x1b]*)(?:\\x1b\\[[\\d;]+m)*$", + "severity": 1, + "message": 4, + "code": 3 + }, + { + "regexp": "^(?:\\x1b\\[[\\d;]+m)*\\s*(?:\\x1b\\[[\\d;]+m)*\\s*--> (?:\\x1b\\[[\\d;]+m)*(.*):(\\d*):(\\d*)(?:\\x1b\\[[\\d;]+m)*$", + "file": 1, + "line": 2, + "column": 3 + } + ] + } + ] +} |
