Skip to content

Commit 9f46ff5

Browse files
committed
Auto merge of #16062 - davidbarsky:david/fix-references-to-removed-settings, r=Veykril
fix: Correct references from `rust-analyzer.cargo.check` to `rust-analyzer.check` When reading the manual, I noticed that the documentation referenced configurations that have since been renamed. This PR updates those references to their new names.
2 parents f1de7d7 + f556c79 commit 9f46ff5

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

crates/rust-analyzer/src/config.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ config_data! {
167167
/// Specifies the working directory for running checks.
168168
/// - "workspace": run checks for workspaces in the corresponding workspaces' root directories.
169169
// FIXME: Ideally we would support this in some way
170-
/// This falls back to "root" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.
170+
/// This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.
171171
/// - "root": run checks in the project's root directory.
172-
/// This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
172+
/// This config only has an effect when `#rust-analyzer.check.overrideCommand#`
173173
/// is set.
174174
check_invocationLocation | checkOnSave_invocationLocation: InvocationLocation = "\"workspace\"",
175175
/// Specifies the invocation strategy to use when running the check command.
176176
/// If `per_workspace` is set, the command will be executed for each workspace.
177177
/// If `once` is set, the command will be executed once.
178-
/// This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
178+
/// This config only has an effect when `#rust-analyzer.check.overrideCommand#`
179179
/// is set.
180180
check_invocationStrategy | checkOnSave_invocationStrategy: InvocationStrategy = "\"per_workspace\"",
181181
/// Whether to pass `--no-default-features` to Cargo. Defaults to
@@ -194,8 +194,8 @@ config_data! {
194194
/// If there are multiple linked projects/workspaces, this command is invoked for
195195
/// each of them, with the working directory being the workspace root
196196
/// (i.e., the folder containing the `Cargo.toml`). This can be overwritten
197-
/// by changing `#rust-analyzer.cargo.check.invocationStrategy#` and
198-
/// `#rust-analyzer.cargo.check.invocationLocation#`.
197+
/// by changing `#rust-analyzer.check.invocationStrategy#` and
198+
/// `#rust-analyzer.check.invocationLocation#`.
199199
///
200200
/// An example command would be:
201201
///

docs/user/generated_config.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`
185185
--
186186
Specifies the working directory for running checks.
187187
- "workspace": run checks for workspaces in the corresponding workspaces' root directories.
188-
This falls back to "root" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.
188+
This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.
189189
- "root": run checks in the project's root directory.
190-
This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
190+
This config only has an effect when `#rust-analyzer.check.overrideCommand#`
191191
is set.
192192
--
193193
[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`)::
@@ -196,7 +196,7 @@ is set.
196196
Specifies the invocation strategy to use when running the check command.
197197
If `per_workspace` is set, the command will be executed for each workspace.
198198
If `once` is set, the command will be executed once.
199-
This config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`
199+
This config only has an effect when `#rust-analyzer.check.overrideCommand#`
200200
is set.
201201
--
202202
[[rust-analyzer.check.noDefaultFeatures]]rust-analyzer.check.noDefaultFeatures (default: `null`)::
@@ -221,8 +221,8 @@ Cargo, you might also want to change
221221
If there are multiple linked projects/workspaces, this command is invoked for
222222
each of them, with the working directory being the workspace root
223223
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
224-
by changing `#rust-analyzer.cargo.check.invocationStrategy#` and
225-
`#rust-analyzer.cargo.check.invocationLocation#`.
224+
by changing `#rust-analyzer.check.invocationStrategy#` and
225+
`#rust-analyzer.check.invocationLocation#`.
226226

227227
An example command would be:
228228

editors/code/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@
736736
"uniqueItems": true
737737
},
738738
"rust-analyzer.check.invocationLocation": {
739-
"markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.cargo.check.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.",
739+
"markdownDescription": "Specifies the working directory for running checks.\n- \"workspace\": run checks for workspaces in the corresponding workspaces' root directories.\n This falls back to \"root\" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.\n- \"root\": run checks in the project's root directory.\nThis config only has an effect when `#rust-analyzer.check.overrideCommand#`\nis set.",
740740
"default": "workspace",
741741
"type": "string",
742742
"enum": [
@@ -749,7 +749,7 @@
749749
]
750750
},
751751
"rust-analyzer.check.invocationStrategy": {
752-
"markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.cargo.check.overrideCommand#`\nis set.",
752+
"markdownDescription": "Specifies the invocation strategy to use when running the check command.\nIf `per_workspace` is set, the command will be executed for each workspace.\nIf `once` is set, the command will be executed once.\nThis config only has an effect when `#rust-analyzer.check.overrideCommand#`\nis set.",
753753
"default": "per_workspace",
754754
"type": "string",
755755
"enum": [
@@ -770,7 +770,7 @@
770770
]
771771
},
772772
"rust-analyzer.check.overrideCommand": {
773-
"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.",
773+
"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.check.invocationStrategy#` and\n`#rust-analyzer.check.invocationLocation#`.\n\nAn example command would be:\n\n```bash\ncargo check --workspace --message-format=json --all-targets\n```\n.",
774774
"default": null,
775775
"type": [
776776
"null",

0 commit comments

Comments
 (0)