Skip to content

Commit c3e4bc3

Browse files
Update docs to include note about ANSI diagnostics
1 parent 4020790 commit c3e4bc3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ config_data! {
160160
check_noDefaultFeatures | checkOnSave_noDefaultFeatures: Option<bool> = "null",
161161
/// Override the command rust-analyzer uses instead of `cargo check` for
162162
/// diagnostics on save. The command is required to output json and
163-
/// should therefore include `--message-format=json` or a similar option.
163+
/// should therefore include `--message-format=json` or a similar option
164+
/// (for colored diagnostics, use
165+
/// `--message-format=json-diagnostic-rendered-ansi`).
164166
///
165167
/// If you're changing this because you're using some tool wrapping
166168
/// Cargo, you might also want to change

docs/user/generated_config.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ Whether to pass `--no-default-features` to Cargo. Defaults to
173173
--
174174
Override the command rust-analyzer uses instead of `cargo check` for
175175
diagnostics on save. The command is required to output json and
176-
should therefore include `--message-format=json` or a similar option.
176+
should therefore include `--message-format=json` or a similar option
177+
(for colored diagnostics, use
178+
`--message-format=json-diagnostic-rendered-ansi`).
177179

178180
If you're changing this because you're using some tool wrapping
179181
Cargo, you might also want to change

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@
644644
]
645645
},
646646
"rust-analyzer.check.overrideCommand": {
647-
"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\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.",
647+
"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(for colored diagnostics, use\n`--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.",
648648
"default": null,
649649
"type": [
650650
"null",

0 commit comments

Comments
 (0)