mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Tidy up vscode extension a bit
This commit is contained in:
parent
f9bb5476c3
commit
ff07caa9de
16 changed files with 143 additions and 171 deletions
|
@ -6,9 +6,8 @@ import * as tasks from "./tasks";
|
|||
import type { CtxInit } from "./ctx";
|
||||
import { makeDebugConfig } from "./debug";
|
||||
import type { Config, RunnableEnvCfg, RunnableEnvCfgItem } from "./config";
|
||||
import { unwrapUndefinable } from "./undefinable";
|
||||
import type { LanguageClient } from "vscode-languageclient/node";
|
||||
import type { RustEditor } from "./util";
|
||||
import { unwrapUndefinable, type RustEditor } from "./util";
|
||||
import * as toolchain from "./toolchain";
|
||||
|
||||
const quickPickButtons = [
|
||||
|
@ -148,8 +147,7 @@ export async function createTaskFromRunnable(
|
|||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
|
||||
const target = vscode.workspace.workspaceFolders?.[0];
|
||||
const exec = await tasks.targetToExecution(definition, config.cargoRunner, true);
|
||||
const task = await tasks.buildRustTask(
|
||||
target,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue