From a2b0bdcc24a64061364aaa017bf6caef1810da7c Mon Sep 17 00:00:00 2001 From: Ilya Titkov Date: Mon, 17 Feb 2020 11:44:58 +0300 Subject: Add arguments to rustfmt --- editors/code/package.json | 18 ++++++++++++++++-- editors/code/src/client.ts | 1 + editors/code/src/config.ts | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'editors/code') diff --git a/editors/code/package.json b/editors/code/package.json index ed1cae2ab..46acbfe76 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -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, diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index efef820ab..11894973c 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -42,6 +42,7 @@ export async function createClient(config: Config): Promise; } - + get rustfmtArgs() { return this.cfg.get("rustfmtArgs") as string[]; } + get cargoWatchOptions(): CargoWatchOptions { return { enable: this.cfg.get("cargo-watch.enable") as boolean, -- cgit v1.2.3