about summary refs log tree commit diff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2020-02-17 14:03:33 +0100
committerAleksey Kladov <aleksey.kladov@gmail.com>2020-02-17 14:03:33 +0100
commitee4e41cbea8ef3758ccebd9ffb35c5290aebfceb (patch)
tree7b377257a1f0e64611a31270b3dfd25d12acd96f /editors/code/src/ctx.ts
parent6167101302bcc2d7f1a345e0ee44e1411056b4b3 (diff)
downloadrust-ee4e41cbea8ef3758ccebd9ffb35c5290aebfceb.tar.gz
rust-ee4e41cbea8ef3758ccebd9ffb35c5290aebfceb.zip
Push IO and error handling up
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts10
1 files changed, 2 insertions, 8 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index c06d8ac3176..935a6f2b5a3 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -23,16 +23,10 @@ export class Ctx {
         this.extCtx = extCtx;
     }
 
-    async startServer() {
+    async startServer(serverPath: string) {
         assert(this.client == null);
 
-        const client = await createClient(this.config);
-        if (!client) {
-            throw new Error(
-                "Rust Analyzer Language Server is not available. " +
-                "Please, ensure its [proper installation](https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#vs-code)."
-            );
-        }
+        const client = await createClient(this.config, serverPath);
 
         this.pushCleanup(client.start());
         await client.onReady();