mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-05 17:58:47 +00:00
Auto merge of #13065 - RalfJung:override-command-docs, r=Veykril
document interaction of checkOnSave.overrideCommand and multiple linked projects Cc https://github.com/rust-lang/rust-analyzer/issues/10793 r? `@Veykril`
This commit is contained in:
commit
c32ab970e3
3 changed files with 11 additions and 2 deletions
|
@ -45,7 +45,8 @@ mod patch_old_style;
|
||||||
// - foo_command = overrides the subcommand, foo_overrideCommand allows full overwriting, extra args only applies for foo_command
|
// - foo_command = overrides the subcommand, foo_overrideCommand allows full overwriting, extra args only applies for foo_command
|
||||||
|
|
||||||
// Defines the server-side configuration of the rust-analyzer. We generate
|
// Defines the server-side configuration of the rust-analyzer. We generate
|
||||||
// *parts* of VS Code's `package.json` config from this.
|
// *parts* of VS Code's `package.json` config from this. Run `cargo test` to
|
||||||
|
// re-generate that file.
|
||||||
//
|
//
|
||||||
// However, editor specific config, which the server doesn't know about, should
|
// However, editor specific config, which the server doesn't know about, should
|
||||||
// be specified directly in `package.json`.
|
// be specified directly in `package.json`.
|
||||||
|
@ -120,6 +121,10 @@ config_data! {
|
||||||
/// Cargo, you might also want to change
|
/// Cargo, you might also want to change
|
||||||
/// `#rust-analyzer.cargo.buildScripts.overrideCommand#`.
|
/// `#rust-analyzer.cargo.buildScripts.overrideCommand#`.
|
||||||
///
|
///
|
||||||
|
/// If there are multiple linked projects, this command is invoked for
|
||||||
|
/// each of them, with the working directory being the project root
|
||||||
|
/// (i.e., the folder containing the `Cargo.toml`).
|
||||||
|
///
|
||||||
/// An example command would be:
|
/// An example command would be:
|
||||||
///
|
///
|
||||||
/// ```bash
|
/// ```bash
|
||||||
|
|
|
@ -118,6 +118,10 @@ If you're changing this because you're using some tool wrapping
|
||||||
Cargo, you might also want to change
|
Cargo, you might also want to change
|
||||||
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
|
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
|
||||||
|
|
||||||
|
If there are multiple linked projects, this command is invoked for
|
||||||
|
each of them, with the working directory being the project root
|
||||||
|
(i.e., the folder containing the `Cargo.toml`).
|
||||||
|
|
||||||
An example command would be:
|
An example command would be:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -547,7 +547,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rust-analyzer.checkOnSave.overrideCommand": {
|
"rust-analyzer.checkOnSave.overrideCommand": {
|
||||||
"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.",
|
"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.",
|
||||||
"default": null,
|
"default": null,
|
||||||
"type": [
|
"type": [
|
||||||
"null",
|
"null",
|
||||||
|
|
Loading…
Reference in a new issue