Skip to content

Commit ba7f2bf

Browse files
committed
Update config docs
1 parent 2de62be commit ba7f2bf

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

docs/user/generated_config.adoc

+11-3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ build procedural macros. The command is required to output json
5757
and should therefore include `--message-format=json` or a similar
5858
option.
5959

60+
If there are multiple linked projects/workspaces, this command is invoked for
61+
each of them, with the working directory being the workspace root
62+
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
63+
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
64+
`#rust-analyzer.cargo.buildScripts.invocationLocation#`.
65+
6066
By default, a cargo invocation will be constructed for the configured
6167
targets and features, with the following base command line:
6268

@@ -206,9 +212,11 @@ If you're changing this because you're using some tool wrapping
206212
Cargo, you might also want to change
207213
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
208214

209-
If there are multiple linked projects, this command is invoked for
210-
each of them, with the working directory being the project root
211-
(i.e., the folder containing the `Cargo.toml`).
215+
If there are multiple linked projects/workspaces, this command is invoked for
216+
each of them, with the working directory being the workspace root
217+
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
218+
by changing `#rust-analyzer.cargo.check.invocationStrategy#` and
219+
`#rust-analyzer.cargo.check.invocationLocation#`.
212220

213221
An example command would be:
214222

editors/code/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@
560560
]
561561
},
562562
"rust-analyzer.cargo.buildScripts.overrideCommand": {
563-
"markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefore include `--message-format=json` or a similar\noption.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets\n```\n.",
563+
"markdownDescription": "Override the command rust-analyzer uses to run build scripts and\nbuild procedural macros. The command is required to output json\nand should therefore include `--message-format=json` or a similar\noption.\n\nIf there are multiple linked projects/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and\n`#rust-analyzer.cargo.buildScripts.invocationLocation#`.\n\nBy default, a cargo invocation will be constructed for the configured\ntargets and features, with the following base command line:\n\n```bash\ncargo check --quiet --workspace --message-format=json --all-targets\n```\n.",
564564
"default": null,
565565
"type": [
566566
"null",
@@ -749,7 +749,7 @@
749749
]
750750
},
751751
"rust-analyzer.check.overrideCommand": {
752-
"markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\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.",
752+
"markdownDescription": "Override the command rust-analyzer uses instead of `cargo check` for\ndiagnostics on save. The command is required to output json and\nshould therefore include `--message-format=json` or a similar option\n(if your client supports the `colorDiagnosticOutput` experimental\ncapability, you can use `--message-format=json-diagnostic-rendered-ansi`).\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/workspaces, this command is invoked for\neach of them, with the working directory being the workspace root\n(i.e., the folder containing the `Cargo.toml`). This can be overwritten\nby changing `#rust-analyzer.cargo.check.invocationStrategy#` and\n`#rust-analyzer.cargo.check.invocationLocation#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
753753
"default": null,
754754
"type": [
755755
"null",

0 commit comments

Comments
 (0)