Skip to content

Commit 42f9887

Browse files
committed
Old configs are back
1 parent 5b56a64 commit 42f9887

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2795,6 +2795,7 @@ impl FullConfigInput {
27952795
GlobalConfigInput::schema_fields(&mut fields);
27962796
LocalConfigInput::schema_fields(&mut fields);
27972797
ClientConfigInput::schema_fields(&mut fields);
2798+
WorkspaceConfigInput::schema_fields(&mut fields);
27982799
fields.sort_by_key(|&(x, ..)| x);
27992800
fields
28002801
.iter()

docs/user/generated_config.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,27 @@ crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
898898

899899
This option does not take effect until rust-analyzer is restarted.
900900
--
901+
[[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
902+
+
903+
--
904+
Additional arguments to `rustfmt`.
905+
--
906+
[[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
907+
+
908+
--
909+
Advanced option, fully override the command rust-analyzer uses for
910+
formatting. This should be the equivalent of `rustfmt` here, and
911+
not that of `cargo fmt`. The file contents will be passed on the
912+
standard input and the formatted result will be read from the
913+
standard output.
914+
--
915+
[[rust-analyzer.rustfmt.rangeFormatting.enable]]rust-analyzer.rustfmt.rangeFormatting.enable (default: `false`)::
916+
+
917+
--
918+
Enables the use of rustfmt's unstable range formatting command for the
919+
`textDocument/rangeFormatting` request. The rustfmt option is unstable and only
920+
available on a nightly build.
921+
--
901922
[[rust-analyzer.semanticHighlighting.doc.comment.inject.enable]]rust-analyzer.semanticHighlighting.doc.comment.inject.enable (default: `true`)::
902923
+
903924
--

editors/code/package.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,45 @@
23942394
}
23952395
}
23962396
},
2397+
{
2398+
"title": "rustfmt",
2399+
"properties": {
2400+
"rust-analyzer.rustfmt.extraArgs": {
2401+
"markdownDescription": "Additional arguments to `rustfmt`.",
2402+
"default": [],
2403+
"type": "array",
2404+
"items": {
2405+
"type": "string"
2406+
}
2407+
}
2408+
}
2409+
},
2410+
{
2411+
"title": "rustfmt",
2412+
"properties": {
2413+
"rust-analyzer.rustfmt.overrideCommand": {
2414+
"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.",
2415+
"default": null,
2416+
"type": [
2417+
"null",
2418+
"array"
2419+
],
2420+
"items": {
2421+
"type": "string"
2422+
}
2423+
}
2424+
}
2425+
},
2426+
{
2427+
"title": "rustfmt",
2428+
"properties": {
2429+
"rust-analyzer.rustfmt.rangeFormatting.enable": {
2430+
"markdownDescription": "Enables the use of rustfmt's unstable range formatting command for the\n`textDocument/rangeFormatting` request. The rustfmt option is unstable and only\navailable on a nightly build.",
2431+
"default": false,
2432+
"type": "boolean"
2433+
}
2434+
}
2435+
},
23972436
{
23982437
"title": "semanticHighlighting",
23992438
"properties": {

0 commit comments

Comments
 (0)