diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 6c4742464c4..349f80278d1 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -26,16 +26,17 @@ export class Config { private cfg!: vscode.WorkspaceConfiguration; + constructor(private readonly ctx: vscode.ExtensionContext) { + vscode.workspace.onDidChangeConfiguration(this.onConfigChange, this, ctx.subscriptions); + this.refreshConfig(); + } + + private refreshConfig() { this.cfg = vscode.workspace.getConfiguration(Config.rootSection); console.log("Using configuration:", this.cfg); } - constructor(private ctx: vscode.ExtensionContext) { - vscode.workspace.onDidChangeConfiguration(this.onConfigChange, this, ctx.subscriptions); - this.refreshConfig(); - } - async onConfigChange(event: vscode.ConfigurationChangeEvent) { this.refreshConfig();