mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
vscode: amend server installation logic to account for nightlies
This commit is contained in:
parent
601fc9d1ab
commit
1e73811fbe
3 changed files with 57 additions and 52 deletions
|
@ -8,6 +8,7 @@ import { activateHighlighting } from './highlighting';
|
|||
import { ensureServerBinary } from './installation/server';
|
||||
import { Config } from './config';
|
||||
import { log } from './util';
|
||||
import { ensureProperExtensionVersion } from './installation/extension';
|
||||
|
||||
let ctx: Ctx | undefined;
|
||||
|
||||
|
@ -34,7 +35,13 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
|
||||
const config = new Config(context);
|
||||
|
||||
const serverPath = await ensureServerBinary(config.serverSource);
|
||||
vscode.workspace.onDidChangeConfiguration(() => ensureProperExtensionVersion(config));
|
||||
|
||||
// Don't await the user response here, otherwise we will block the lsp server bootstrap
|
||||
void ensureProperExtensionVersion(config);
|
||||
|
||||
const serverPath = await ensureServerBinary(config);
|
||||
|
||||
if (serverPath == null) {
|
||||
throw new Error(
|
||||
"Rust Analyzer Language Server is not available. " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue