about summary refs log tree commit diff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2022-10-20 21:12:58 +0200
committerLukas Wirth <lukastw97@gmail.com>2022-10-20 21:14:36 +0200
commita8e0a20ce4396d3c77adf3b5deb48edfd27d6af2 (patch)
tree1e640105869a45c4346730c26d24a5aa0c57e9e7 /editors/code/src/ctx.ts
parentf3cce5feea047e61af84f371072a021a333ba69f (diff)
downloadrust-a8e0a20ce4396d3c77adf3b5deb48edfd27d6af2.tar.gz
rust-a8e0a20ce4396d3c77adf3b5deb48edfd27d6af2.zip
internal: Properly handle language configuration config changes
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index e94d4365c37..75c6d4698c1 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -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;
             },
         };
     }