remove unnecessary
This commit is contained in:
parent
336909b63a
commit
06c02021a3
4 changed files with 6 additions and 6 deletions
|
@ -11,7 +11,7 @@ export interface Env {
|
|||
}
|
||||
|
||||
function renderCommand(cmd: ra.CommandLink) {
|
||||
return `[${cmd.title}](command:${cmd.command}?${encodeURIComponent(JSON.stringify(cmd.arguments))} '${cmd.tooltip!}')`;
|
||||
return `[${cmd.title}](command:${cmd.command}?${encodeURIComponent(JSON.stringify(cmd.arguments))} '${cmd.tooltip}')`;
|
||||
}
|
||||
|
||||
function renderHoverActions(actions: ra.CommandLinkGroup[]): vscode.MarkdownString {
|
||||
|
|
|
@ -87,11 +87,11 @@ async function getDebugConfiguration(ctx: Ctx, runnable: ra.Runnable): Promise<v
|
|||
debugOutput.show(true);
|
||||
}
|
||||
|
||||
const isMultiFolderWorkspace = vscode.workspace.workspaceFolders!.length > 1;
|
||||
const firstWorkspace = vscode.workspace.workspaceFolders![0]; // folder exists or RA is not active.
|
||||
const isMultiFolderWorkspace = vscode.workspace.workspaceFolders.length > 1;
|
||||
const firstWorkspace = vscode.workspace.workspaceFolders[0]; // folder exists or RA is not active.
|
||||
const workspace = !isMultiFolderWorkspace || !runnable.args.workspaceRoot ?
|
||||
firstWorkspace :
|
||||
vscode.workspace.workspaceFolders!.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace;
|
||||
vscode.workspace.workspaceFolders.find(w => runnable.args.workspaceRoot?.includes(w.uri.fsPath)) || firstWorkspace;
|
||||
|
||||
const wsFolder = path.normalize(workspace.uri.fsPath);
|
||||
const workspaceQualifier = isMultiFolderWorkspace ? `:${workspace.name}` : '';
|
||||
|
|
|
@ -145,7 +145,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
overrideCargo: runnable.args.overrideCargo,
|
||||
};
|
||||
|
||||
const target = vscode.workspace.workspaceFolders![0]; // safe, see main activate()
|
||||
const target = vscode.workspace.workspaceFolders[0]; // safe, see main activate()
|
||||
const cargoTask = await tasks.buildCargoTask(target, definition, runnable.label, args, config.cargoRunner, true);
|
||||
cargoTask.presentationOptions.clear = true;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ function parseSnippet(snip: string): [string, [number, number]] | undefined {
|
|||
const m = snip.match(/\$(0|\{0:([^}]*)\})/);
|
||||
if (!m) return undefined;
|
||||
const placeholder = m[2] ?? "";
|
||||
const range: [number, number] = [m.index!!, placeholder.length];
|
||||
const range: [number, number] = [m.index, placeholder.length];
|
||||
const insert = snip.replace(m[0], placeholder);
|
||||
return [insert, range];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue