vscode: reordered config constructor before methods

This commit is contained in:
Veetaha 2020-02-13 23:05:32 +02:00
parent 7ad15c3962
commit fd37151ade

View file

@ -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();