mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
feature: add build system info; runnables to rust-project.json
This commit is contained in:
parent
14a1f4530c
commit
71a78a9cdc
17 changed files with 628 additions and 227 deletions
|
@ -9,10 +9,11 @@ import {
|
|||
applySnippetTextEdits,
|
||||
type SnippetTextDocumentEdit,
|
||||
} from "./snippets";
|
||||
import { type RunnableQuickPick, selectRunnable, createTask, createArgs } from "./run";
|
||||
import { type RunnableQuickPick, selectRunnable, createTask, createCargoArgs } from "./run";
|
||||
import { AstInspector } from "./ast_inspector";
|
||||
import {
|
||||
isRustDocument,
|
||||
isCargoRunnableArgs,
|
||||
isCargoTomlDocument,
|
||||
sleep,
|
||||
isRustEditor,
|
||||
|
@ -1154,8 +1155,8 @@ export function copyRunCommandLine(ctx: CtxInit) {
|
|||
let prevRunnable: RunnableQuickPick | undefined;
|
||||
return async () => {
|
||||
const item = await selectRunnable(ctx, prevRunnable);
|
||||
if (!item) return;
|
||||
const args = createArgs(item.runnable);
|
||||
if (!item || !isCargoRunnableArgs(item.runnable.args)) return;
|
||||
const args = createCargoArgs(item.runnable.args);
|
||||
const commandLine = ["cargo", ...args].join(" ");
|
||||
await vscode.env.clipboard.writeText(commandLine);
|
||||
await vscode.window.showInformationMessage("Cargo invocation copied to the clipboard.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue