diff options
author | Aleksey Kladov <[email protected]> | 2020-02-17 13:03:33 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-17 13:03:33 +0000 |
commit | ee4e41cbea8ef3758ccebd9ffb35c5290aebfceb (patch) | |
tree | 7b377257a1f0e64611a31270b3dfd25d12acd96f /editors/code/src/ctx.ts | |
parent | 6167101302bcc2d7f1a345e0ee44e1411056b4b3 (diff) |
Push IO and error handling up
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r-- | editors/code/src/ctx.ts | 10 |
1 files changed, 2 insertions, 8 deletions
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 { | |||
23 | this.extCtx = extCtx; | 23 | this.extCtx = extCtx; |
24 | } | 24 | } |
25 | 25 | ||
26 | async startServer() { | 26 | async startServer(serverPath: string) { |
27 | assert(this.client == null); | 27 | assert(this.client == null); |
28 | 28 | ||
29 | const client = await createClient(this.config); | 29 | const client = await createClient(this.config, serverPath); |
30 | if (!client) { | ||
31 | throw new Error( | ||
32 | "Rust Analyzer Language Server is not available. " + | ||
33 | "Please, ensure its [proper installation](https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#vs-code)." | ||
34 | ); | ||
35 | } | ||
36 | 30 | ||
37 | this.pushCleanup(client.start()); | 31 | this.pushCleanup(client.start()); |
38 | await client.onReady(); | 32 | await client.onReady(); |