aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands/server_version.ts
blob: 03528b8252c2cd29e384e748671c59e296eb48d1 (plain)
1
2
3
4
5
6
7
8
9
10
import * as vscode from "vscode";
import { spawnSync } from "child_process";
import { Ctx, Cmd } from '../ctx';

export function serverVersion(ctx: Ctx): Cmd {
    return async () => {
        const version = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }).stdout;
        vscode.window.showInformationMessage('rust-analyzer version : ' + version);
    };
}