aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-03-09 17:57:55 +0000
committerVeetaha <[email protected]>2020-03-14 00:01:46 +0000
commit1e73811fbe634efec90a3e009a84fd8dda9f5697 (patch)
treec87cff735a65fcc1c8d6c46d2dd8a9148f359c24 /editors/code/src/main.ts
parent601fc9d1abf52c16356d49b6c540b31718e62b88 (diff)
vscode: amend server installation logic to account for nightlies
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index ecf53cf77..ee67c750c 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -8,6 +8,7 @@ import { activateHighlighting } from './highlighting';
8import { ensureServerBinary } from './installation/server'; 8import { ensureServerBinary } from './installation/server';
9import { Config } from './config'; 9import { Config } from './config';
10import { log } from './util'; 10import { log } from './util';
11import { ensureProperExtensionVersion } from './installation/extension';
11 12
12let ctx: Ctx | undefined; 13let ctx: Ctx | undefined;
13 14
@@ -34,7 +35,13 @@ export async function activate(context: vscode.ExtensionContext) {
34 35
35 const config = new Config(context); 36 const config = new Config(context);
36 37
37 const serverPath = await ensureServerBinary(config.serverSource); 38 vscode.workspace.onDidChangeConfiguration(() => ensureProperExtensionVersion(config));
39
40 // Don't await the user response here, otherwise we will block the lsp server bootstrap
41 void ensureProperExtensionVersion(config);
42
43 const serverPath = await ensureServerBinary(config);
44
38 if (serverPath == null) { 45 if (serverPath == null) {
39 throw new Error( 46 throw new Error(
40 "Rust Analyzer Language Server is not available. " + 47 "Rust Analyzer Language Server is not available. " +