Skip to content

Commit 1b2eaa5

Browse files
committed
Old configs are back
1 parent 8e31598 commit 1b2eaa5

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2759,6 +2759,7 @@ impl FullConfigInput {
27592759
GlobalConfigInput::schema_fields(&mut fields);
27602760
LocalConfigInput::schema_fields(&mut fields);
27612761
ClientConfigInput::schema_fields(&mut fields);
2762+
WorkspaceConfigInput::schema_fields(&mut fields);
27622763
fields.sort_by_key(|&(x, ..)| x);
27632764
fields
27642765
.iter()

src/tools/rust-analyzer/docs/user/generated_config.adoc

+21
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,27 @@ crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
878878

879879
This option does not take effect until rust-analyzer is restarted.
880880
--
881+
[[rust-analyzer.rustfmt.extraArgs]]rust-analyzer.rustfmt.extraArgs (default: `[]`)::
882+
+
883+
--
884+
Additional arguments to `rustfmt`.
885+
--
886+
[[rust-analyzer.rustfmt.overrideCommand]]rust-analyzer.rustfmt.overrideCommand (default: `null`)::
887+
+
888+
--
889+
Advanced option, fully override the command rust-analyzer uses for
890+
formatting. This should be the equivalent of `rustfmt` here, and
891+
not that of `cargo fmt`. The file contents will be passed on the
892+
standard input and the formatted result will be read from the
893+
standard output.
894+
--
895+
[[rust-analyzer.rustfmt.rangeFormatting.enable]]rust-analyzer.rustfmt.rangeFormatting.enable (default: `false`)::
896+
+
897+
--
898+
Enables the use of rustfmt's unstable range formatting command for the
899+
`textDocument/rangeFormatting` request. The rustfmt option is unstable and only
900+
available on a nightly build.
901+
--
881902
[[rust-analyzer.semanticHighlighting.doc.comment.inject.enable]]rust-analyzer.semanticHighlighting.doc.comment.inject.enable (default: `true`)::
882903
+
883904
--

src/tools/rust-analyzer/editors/code/package.json

+39
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,45 @@
23582358
}
23592359
}
23602360
},
2361+
{
2362+
"title": "rustfmt",
2363+
"properties": {
2364+
"rust-analyzer.rustfmt.extraArgs": {
2365+
"markdownDescription": "Additional arguments to `rustfmt`.",
2366+
"default": [],
2367+
"type": "array",
2368+
"items": {
2369+
"type": "string"
2370+
}
2371+
}
2372+
}
2373+
},
2374+
{
2375+
"title": "rustfmt",
2376+
"properties": {
2377+
"rust-analyzer.rustfmt.overrideCommand": {
2378+
"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.",
2379+
"default": null,
2380+
"type": [
2381+
"null",
2382+
"array"
2383+
],
2384+
"items": {
2385+
"type": "string"
2386+
}
2387+
}
2388+
}
2389+
},
2390+
{
2391+
"title": "rustfmt",
2392+
"properties": {
2393+
"rust-analyzer.rustfmt.rangeFormatting.enable": {
2394+
"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.",
2395+
"default": false,
2396+
"type": "boolean"
2397+
}
2398+
}
2399+
},
23612400
{
23622401
"title": "semanticHighlighting",
23632402
"properties": {

0 commit comments

Comments
 (0)