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.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index a4dcc3037..f0e2d72f7 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -29,7 +29,11 @@ export class Ctx {
29 await old.stop(); 29 await old.stop();
30 } 30 }
31 this.client = null; 31 this.client = null;
32 const client = createClient(this.config); 32 const client = await createClient(this.config);
33 if (!client) {
34 throw new Error("Rust Analyzer Language Server is not available");
35 }
36
33 this.pushCleanup(client.start()); 37 this.pushCleanup(client.start());
34 await client.onReady(); 38 await client.onReady();
35 39