mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add version info to status bar item
This commit is contained in:
parent
7c5d496ef8
commit
0ee8a4f472
2 changed files with 46 additions and 24 deletions
|
@ -9,7 +9,6 @@ import {
|
|||
applySnippetTextEdits,
|
||||
type SnippetTextDocumentEdit,
|
||||
} from "./snippets";
|
||||
import { spawnSync } from "child_process";
|
||||
import { type RunnableQuickPick, selectRunnable, createTask, createArgs } from "./run";
|
||||
import { AstInspector } from "./ast_inspector";
|
||||
import {
|
||||
|
@ -415,10 +414,9 @@ export function serverVersion(ctx: CtxInit): Cmd {
|
|||
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();
|
||||
|
||||
void vscode.window.showInformationMessage(`rust-analyzer version: ${versionString}`);
|
||||
void vscode.window.showInformationMessage(
|
||||
`rust-analyzer version: ${ctx.serverVersion} [${ctx.serverPath}]`,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue