We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2619bf commit 0072aa3Copy full SHA for 0072aa3
editors/code/src/commands/server_version.ts
@@ -4,7 +4,12 @@ import { Ctx, Cmd } from '../ctx';
4
5
export function serverVersion(ctx: Ctx): Cmd {
6
return async () => {
7
- const version = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" }).stdout;
8
- vscode.window.showInformationMessage('rust-analyzer version : ' + version);
+ const { stdout } = spawnSync(ctx.serverPath, ["--version"], { encoding: "utf8" });
+ const commitHash = stdout.slice(`rust-analyzer `.length).trim();
9
+ const { releaseTag } = ctx.config;
10
+
11
+ void vscode.window.showInformationMessage(
12
+ `rust-analyzer version: ${releaseTag ?? "unreleased"} (${commitHash})`
13
+ );
14
};
15
}
0 commit comments