internal: Properly handle language configuration config changes

This commit is contained in:
Lukas Wirth 2022-10-20 21:12:58 +02:00
parent f3cce5feea
commit a8e0a20ce4
3 changed files with 88 additions and 80 deletions

View file

@ -38,6 +38,7 @@ export class Ctx {
this.dispose();
},
});
extCtx.subscriptions.push(this);
this.statusBar.text = "rust-analyzer";
this.statusBar.tooltip = "ready";
this.statusBar.command = "rust-analyzer.analyzerStatus";
@ -48,10 +49,15 @@ export class Ctx {
this.config = new Config(extCtx);
}
dispose() {
this.config.dispose();
}
clientFetcher() {
const self = this;
return {
get client(): lc.LanguageClient | undefined {
return this.client;
return self.client;
},
};
}