mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 19:34:16 +00:00
Add arguments to rustfmt
This commit is contained in:
parent
32fc890de8
commit
a2b0bdcc24
7 changed files with 25 additions and 3 deletions
|
@ -188,6 +188,14 @@
|
|||
"default": [],
|
||||
"description": "Paths to exclude from analysis"
|
||||
},
|
||||
"rust-analyzer.rustfmtArgs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [],
|
||||
"description": "Additional arguments to rustfmt"
|
||||
},
|
||||
"rust-analyzer.useClientWatching": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
|
@ -233,7 +241,10 @@
|
|||
"description": "Trace requests to the ra_lsp_server"
|
||||
},
|
||||
"rust-analyzer.lruCapacity": {
|
||||
"type": [ "null", "integer" ],
|
||||
"type": [
|
||||
"null",
|
||||
"integer"
|
||||
],
|
||||
"default": null,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
|
@ -245,7 +256,10 @@
|
|||
"description": "Display additional type and parameter information in the editor"
|
||||
},
|
||||
"rust-analyzer.maxInlayHintLength": {
|
||||
"type": [ "null", "integer" ],
|
||||
"type": [
|
||||
"null",
|
||||
"integer"
|
||||
],
|
||||
"default": 20,
|
||||
"minimum": 0,
|
||||
"exclusiveMinimum": true,
|
||||
|
|
|
@ -42,6 +42,7 @@ export async function createClient(config: Config): Promise<null | lc.LanguageCl
|
|||
featureFlags: config.featureFlags,
|
||||
withSysroot: config.withSysroot,
|
||||
cargoFeatures: config.cargoFeatures,
|
||||
rustfmtArgs: config.rustfmtArgs,
|
||||
},
|
||||
traceOutputChannel,
|
||||
};
|
||||
|
|
|
@ -149,7 +149,8 @@ export class Config {
|
|||
get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; }
|
||||
get useClientWatching() { return this.cfg.get("useClientWatching") as boolean; }
|
||||
get featureFlags() { return this.cfg.get("featureFlags") as Record<string, boolean>; }
|
||||
|
||||
get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; }
|
||||
|
||||
get cargoWatchOptions(): CargoWatchOptions {
|
||||
return {
|
||||
enable: this.cfg.get("cargo-watch.enable") as boolean,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue