diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/config.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 6c4742464..349f80278 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -26,16 +26,17 @@ export class Config { | |||
26 | 26 | ||
27 | private cfg!: vscode.WorkspaceConfiguration; | 27 | private cfg!: vscode.WorkspaceConfiguration; |
28 | 28 | ||
29 | constructor(private readonly ctx: vscode.ExtensionContext) { | ||
30 | vscode.workspace.onDidChangeConfiguration(this.onConfigChange, this, ctx.subscriptions); | ||
31 | this.refreshConfig(); | ||
32 | } | ||
33 | |||
34 | |||
29 | private refreshConfig() { | 35 | private refreshConfig() { |
30 | this.cfg = vscode.workspace.getConfiguration(Config.rootSection); | 36 | this.cfg = vscode.workspace.getConfiguration(Config.rootSection); |
31 | console.log("Using configuration:", this.cfg); | 37 | console.log("Using configuration:", this.cfg); |
32 | } | 38 | } |
33 | 39 | ||
34 | constructor(private ctx: vscode.ExtensionContext) { | ||
35 | vscode.workspace.onDidChangeConfiguration(this.onConfigChange, this, ctx.subscriptions); | ||
36 | this.refreshConfig(); | ||
37 | } | ||
38 | |||
39 | async onConfigChange(event: vscode.ConfigurationChangeEvent) { | 40 | async onConfigChange(event: vscode.ConfigurationChangeEvent) { |
40 | this.refreshConfig(); | 41 | this.refreshConfig(); |
41 | 42 | ||