mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-09 21:42:44 +00:00
vscode: reordered config constructor before methods
This commit is contained in:
parent
7ad15c3962
commit
fd37151ade
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user