diff options
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r-- | editors/code/src/main.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index e01c89cc7..bd4661a36 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -8,6 +8,7 @@ import { activateHighlighting } from './highlighting'; | |||
8 | import { ensureServerBinary } from './installation/server'; | 8 | import { ensureServerBinary } from './installation/server'; |
9 | import { Config } from './config'; | 9 | import { Config } from './config'; |
10 | import { log } from './util'; | 10 | import { log } from './util'; |
11 | import { ensureProperExtensionVersion } from './installation/extension'; | ||
11 | 12 | ||
12 | let ctx: Ctx | undefined; | 13 | let 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).catch(log.error)); |
39 | |||
40 | // Don't await the user response here, otherwise we will block the lsp server bootstrap | ||
41 | void ensureProperExtensionVersion(config).catch(log.error); | ||
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. " + |