aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-02-13 21:05:32 +0000
committerVeetaha <[email protected]>2020-02-13 21:05:32 +0000
commitfd37151ade9948398e863c38418fb4f0d0acdfa7 (patch)
tree5381d5a4a688d65aa6ee0ea5aae77e1d301b475a /editors
parent7ad15c396286376c4a439b2dec4ec452b5f28dda (diff)
vscode: reordered config constructor before methods
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/config.ts11
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