Skip to content

Commit

Permalink
fix CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kaplan-shaked committed Apr 9, 2024
1 parent 52bedc8 commit b7c4e36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/metals-vscode/src/debugger/scalaDebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from "metals-languageclient";
import { ExtendedScalaRunMain, ScalaCodeLensesParams } from "./types";
import { platform } from "os";
import { currentFile, currentWorkspaceFolder } from "../util";
import { currentWorkspaceFolder } from "../util";

const configurationType = "scala";

Expand Down Expand Up @@ -76,10 +76,10 @@ async function runMain(main: ExtendedScalaRunMain): Promise<boolean> {
},
{}
);
const file = currentFile();

const shellOptions = { ...platformSpecificOptions(), env };
const task = new Task(
{ type: "scala" + (file ? `: ${file.fileName}` : ""), task: "run" },
{ type: "scala", task: "run", class: main.data.class },
workspaceFolder,
"Scala run",
"Metals",
Expand Down
5 changes: 0 additions & 5 deletions packages/metals-vscode/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
window,
workspace,
WorkspaceFolder,
TextDocument,
} from "vscode";
import {
ExecuteCommandRequest,
Expand Down Expand Up @@ -71,10 +70,6 @@ export function currentWorkspaceFolder(): WorkspaceFolder | undefined {
return workspace.workspaceFolders?.[0];
}

export function currentFile(): TextDocument | undefined {
return window.activeTextEditor?.document;
}

export function getTextDocumentPositionParams(
editor: TextEditor
): TextDocumentPositionParams {
Expand Down

0 comments on commit b7c4e36

Please sign in to comment.