diff options
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; |