Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a129db

Browse files
authored
feat: Can open the problem file directly (LeetCode-OpenSource#511)
1 parent1c4a39e commit1a129db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/utils/workspaceUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ export async function selectWorkspaceFolder(): Promise<string> {
2929
if(needAsk){
3030
constchoice:string|undefined=awaitvscode.window.showQuickPick(
3131
[
32+
OpenOption.justOpenFile,
3233
OpenOption.openInCurrentWindow,
3334
OpenOption.openInNewWindow,
3435
OpenOption.addToWorkspace,
3536
],
36-
{placeHolder:"Select how youwould like to openyour workspace folder"},
37+
{placeHolder:"The LeetCode workspace folder is not opened in VS Code,wouldyoulike to openit?"},
3738
);
3839

3940
switch(choice){
41+
caseOpenOption.justOpenFile:
42+
returnworkspaceFolderSetting;
4043
caseOpenOption.openInCurrentWindow:
4144
awaitvscode.commands.executeCommand("vscode.openFolder",vscode.Uri.file(workspaceFolderSetting),false);
4245
return"";
@@ -117,6 +120,7 @@ async function determineLeetCodeFolder(): Promise<string> {
117120
}
118121

119122
enumOpenOption{
123+
justOpenFile="Just open the problem file",
120124
openInCurrentWindow="Open in current window",
121125
openInNewWindow="Open in new window",
122126
addToWorkspace="Add to workspace",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp