Skip to content

Commit 4af9829

Browse files
committed
document interaction of checkOnSave.overrideCommand and multiple linked projects
1 parent 2f02ea0 commit 4af9829

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

crates/rust-analyzer/src/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ config_data! {
120120
/// Cargo, you might also want to change
121121
/// `#rust-analyzer.cargo.buildScripts.overrideCommand#`.
122122
///
123+
/// If there are multiple linked projects, this command is invoked for
124+
/// each of them, with the working directory being the project root
125+
/// (i.e., the folder containing the `Cargo.toml`).
126+
///
123127
/// An example command would be:
124128
///
125129
/// ```bash

docs/user/generated_config.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ If you're changing this because you're using some tool wrapping
118118
Cargo, you might also want to change
119119
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
120120

121+
If there are multiple linked projects, this command is invoked for
122+
each of them, with the working directory being the project root
123+
(i.e., the folder containing the `Cargo.toml`).
124+
121125
An example command would be:
122126

123127
```bash

editors/code/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@
547547
]
548548
},
549549
"rust-analyzer.checkOnSave.overrideCommand": {
550-
"markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefor include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
550+
"markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefor include `--message-format=json` or a similar option.\n\nIf you're changing this because you're using some tool wrapping\nCargo, you might also want to change\n`#rust-analyzer.cargo.buildScripts.overrideCommand#`.\n\nIf there are multiple linked projects, this command is invoked for\neach of them, with the working directory being the project root\n(i.e., the folder containing the `Cargo.toml`).\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
551551
"default": null,
552552
"type": [
553553
"null",

0 commit comments

Comments
 (0)