Properly reload changed configs for server start

This commit is contained in:
Lukas Wirth 2022-10-17 14:53:46 +02:00
parent 6f435977df
commit 8aaafddee8
4 changed files with 51 additions and 57 deletions

View file

@ -310,6 +310,10 @@ export function ssr(ctx: Ctx): Cmd {
export function serverVersion(ctx: Ctx): Cmd {
return async () => {
if (!ctx.serverPath) {
void vscode.window.showWarningMessage(`rust-analyzer server is not running`);
return;
}
const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
const versionString = stdout.slice(`rust-analyzer `.length).trim();