diff options
author | Aleksey Kladov <[email protected]> | 2019-12-31 16:34:52 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-31 16:34:52 +0000 |
commit | 0849f7001cac6af93ce9e9356f8c21881bbe34c5 (patch) | |
tree | 1506aada153acfefc4f5059612439cfa9cedc2c5 /editors/code/src/config.ts | |
parent | 76f283108b5fc7aeb105eee0e5d44cae2ffab173 (diff) |
Refactor config
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 9800b461f..ec2790b63 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -43,14 +43,12 @@ export class Config { | |||
43 | private prevEnhancedTyping: null | boolean = null; | 43 | private prevEnhancedTyping: null | boolean = null; |
44 | private prevCargoFeatures: null | CargoFeatures = null; | 44 | private prevCargoFeatures: null | CargoFeatures = null; |
45 | 45 | ||
46 | constructor() { | 46 | constructor(ctx: vscode.ExtensionContext) { |
47 | vscode.workspace.onDidChangeConfiguration(_ => | 47 | vscode.workspace.onDidChangeConfiguration(_ => this.refresh(), ctx.subscriptions); |
48 | this.userConfigChanged(), | 48 | this.refresh(); |
49 | ); | ||
50 | this.userConfigChanged(); | ||
51 | } | 49 | } |
52 | 50 | ||
53 | userConfigChanged() { | 51 | private refresh() { |
54 | const config = vscode.workspace.getConfiguration('rust-analyzer'); | 52 | const config = vscode.workspace.getConfiguration('rust-analyzer'); |
55 | 53 | ||
56 | let requireReloadMessage = null; | 54 | let requireReloadMessage = null; |