mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Push IO and error handling up
This commit is contained in:
parent
6167101302
commit
ee4e41cbea
3 changed files with 13 additions and 14 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue