aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 1eff88df2..c06d8ac31 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -17,7 +17,6 @@ export class Ctx {
17 // on the event loop to get a better picture of what we can do here) 17 // on the event loop to get a better picture of what we can do here)
18 client: lc.LanguageClient | null = null; 18 client: lc.LanguageClient | null = null;
19 private extCtx: vscode.ExtensionContext; 19 private extCtx: vscode.ExtensionContext;
20 private onStartHooks: Array<(client: lc.LanguageClient) => void> = [];
21 20
22 constructor(extCtx: vscode.ExtensionContext) { 21 constructor(extCtx: vscode.ExtensionContext) {
23 this.config = new Config(extCtx); 22 this.config = new Config(extCtx);
@@ -39,9 +38,6 @@ export class Ctx {
39 await client.onReady(); 38 await client.onReady();
40 39
41 this.client = client; 40 this.client = client;
42 for (const hook of this.onStartHooks) {
43 hook(client);
44 }
45 } 41 }
46 42
47 get activeRustEditor(): vscode.TextEditor | undefined { 43 get activeRustEditor(): vscode.TextEditor | undefined {
@@ -69,15 +65,6 @@ export class Ctx {
69 pushCleanup(d: Disposable) { 65 pushCleanup(d: Disposable) {
70 this.extCtx.subscriptions.push(d); 66 this.extCtx.subscriptions.push(d);
71 } 67 }
72
73 onStart(hook: (client: lc.LanguageClient) => void) {
74 const client = this.client;
75 if (client == null) {
76 this.onStartHooks.push(hook);
77 } else {
78 hook(client)
79 }
80 }
81} 68}
82 69
83export interface Disposable { 70export interface Disposable {