mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-18 03:13:31 +00:00
Fix and cleanup VSCode task building
This commit is contained in:
parent
6b8b8ff4c5
commit
8846b5cf4a
5 changed files with 85 additions and 72 deletions
|
|
@ -9,7 +9,12 @@ import {
|
|||
applySnippetTextEdits,
|
||||
type SnippetTextDocumentEdit,
|
||||
} from "./snippets";
|
||||
import { type RunnableQuickPick, selectRunnable, createTask, createCargoArgs } from "./run";
|
||||
import {
|
||||
type RunnableQuickPick,
|
||||
selectRunnable,
|
||||
createTaskFromRunnable,
|
||||
createCargoArgs,
|
||||
} from "./run";
|
||||
import { AstInspector } from "./ast_inspector";
|
||||
import {
|
||||
isRustDocument,
|
||||
|
|
@ -1096,7 +1101,7 @@ export function run(ctx: CtxInit): Cmd {
|
|||
|
||||
item.detail = "rerun";
|
||||
prevRunnable = item;
|
||||
const task = await createTask(item.runnable, ctx.config);
|
||||
const task = await createTaskFromRunnable(item.runnable, ctx.config);
|
||||
return await vscode.tasks.executeTask(task);
|
||||
};
|
||||
}
|
||||
|
|
@ -1139,7 +1144,7 @@ export function runSingle(ctx: CtxInit): Cmd {
|
|||
const editor = ctx.activeRustEditor;
|
||||
if (!editor) return;
|
||||
|
||||
const task = await createTask(runnable, ctx.config);
|
||||
const task = await createTaskFromRunnable(runnable, ctx.config);
|
||||
task.group = vscode.TaskGroup.Build;
|
||||
task.presentationOptions = {
|
||||
reveal: vscode.TaskRevealKind.Always,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue