From ee4e41cbea8ef3758ccebd9ffb35c5290aebfceb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 17 Feb 2020 14:03:33 +0100 Subject: Push IO and error handling up --- editors/code/src/ctx.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'editors/code/src/ctx.ts') diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index c06d8ac31..935a6f2b5 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(); -- cgit v1.2.3