about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorIlya Titkov <ilya@titkov.me>2020-02-17 11:44:58 +0300
committerIlya Titkov <ilya@titkov.me>2020-02-17 11:44:58 +0300
commita2b0bdcc24a64061364aaa017bf6caef1810da7c (patch)
treee434da0a4a0d6f8413be638d6c5d98a215e98792 /editors/code/src
parent32fc890de87e25c342b7c141ef98b07cb1471128 (diff)
downloadrust-a2b0bdcc24a64061364aaa017bf6caef1810da7c.tar.gz
rust-a2b0bdcc24a64061364aaa017bf6caef1810da7c.zip
Add arguments to rustfmt
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/client.ts1
-rw-r--r--editors/code/src/config.ts3
2 files changed, 3 insertions, 1 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index efef820abfa..11894973cd7 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -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,
     };
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 70cb0a612a0..5fffd1fa714 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -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,