diff options
| author | bors <bors@rust-lang.org> | 2023-02-21 10:48:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-21 10:48:22 +0000 |
| commit | 27239fbb58a115915ffc1ce65ededc951eb00fd2 (patch) | |
| tree | 21cf789359d0d6abc98d623b0deef9c7a8f6e386 | |
| parent | e59ada921fcc4a218a1489100c69f5af35b98736 (diff) | |
| parent | 563bd9c24a0620906e4640f57262ea33e48687f0 (diff) | |
| download | rust-27239fbb58a115915ffc1ce65ededc951eb00fd2.tar.gz rust-27239fbb58a115915ffc1ce65ededc951eb00fd2.zip | |
Auto merge of #14183 - lnicola:rustfmt-command-docs, r=lowr
minor: Try to improve the `rustfmt.overrideCommand` docs Closes #14078
| -rw-r--r-- | crates/rust-analyzer/src/config.rs | 5 | ||||
| -rw-r--r-- | docs/user/generated_config.adoc | 5 | ||||
| -rw-r--r-- | editors/code/package.json | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index f609a50a05f..48d3fd0e2b9 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -456,7 +456,10 @@ config_data! { /// Additional arguments to `rustfmt`. rustfmt_extraArgs: Vec<String> = "[]", /// Advanced option, fully override the command rust-analyzer uses for - /// formatting. + /// formatting. This should be the equivalent of `rustfmt` here, and + /// not that of `cargo fmt`. The file contents will be passed on the + /// standard input and the formatted result will be read from the + /// standard output. rustfmt_overrideCommand: Option<Vec<String>> = "null", /// Enables the use of rustfmt's unstable range formatting command for the /// `textDocument/rangeFormatting` request. The rustfmt option is unstable and only diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index 50e3670a7a8..ed7df3eac3d 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -699,7 +699,10 @@ Additional arguments to `rustfmt`. + -- Advanced option, fully override the command rust-analyzer uses for -formatting. +formatting. This should be the equivalent of `rustfmt` here, and +not that of `cargo fmt`. The file contents will be passed on the +standard input and the formatted result will be read from the +standard output. -- [[rust-analyzer.rustfmt.rangeFormatting.enable]]rust-analyzer.rustfmt.rangeFormatting.enable (default: `false`):: + diff --git a/editors/code/package.json b/editors/code/package.json index 3610e993f82..42a23eb16fd 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1283,7 +1283,7 @@ } }, "rust-analyzer.rustfmt.overrideCommand": { - "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for\nformatting.", + "markdownDescription": "Advanced option, fully override the command rust-analyzer uses for\nformatting. This should be the equivalent of `rustfmt` here, and\nnot that of `cargo fmt`. The file contents will be passed on the\nstandard input and the formatted result will be read from the\nstandard output.", "default": null, "type": [ "null", |
