Files
rust/editors/code/src/commands/server_version.ts

11 lines
373 B
TypeScript
Raw Normal View History

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 () => {
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
}