2020-03-17 12:44:31 +01:00
|
|
|
import * as vscode from "vscode";
|
|
|
|
|
import { spawnSync } from "child_process";
|
2020-02-21 09:57:24 +08:00
|
|
|
import { Ctx, Cmd } from '../ctx';
|
2020-02-21 10:04:03 +08:00
|
|
|
|
2020-02-21 09:57:24 +08:00
|
|
|
export function serverVersion(ctx: Ctx): Cmd {
|
|
|
|
|
return async () => {
|
2020-03-17 12:44:31 +01:00
|
|
|
const version = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }).stdout;
|
2020-02-21 09:57:24 +08:00
|
|
|
vscode.window.showInformationMessage('rust-analyzer version : ' + version);
|
2020-02-21 10:04:03 +08:00
|
|
|
};
|
2020-02-20 16:49:31 +08:00
|
|
|
}
|