Skip to content

Considering to merge 'leetcode.workspaceFolder' and 'leetcode.outputFolder' into one single setting. #372

Closed
@jdneo

Description

@jdneo
Member

🚀 Feature Proposal

Currently the leetcode.workspaceFolder is used to specify the folder path and leetcode.outputFolder is used to specify the relative path. But it's confusing. Merge them into one single setting might be a good choice.

Activity

magic-akari

magic-akari commented on Aug 2, 2019

@magic-akari
Contributor

Maybe it is better to use current opened folder as leetcode.workspaceFolder.

手工指定 workspaceFolder 感觉有点奇怪,直接使用当前打开的文件夹作为工作目录不是更自然么?

至于没有打开文件夹的情况,这种模式和这个插件的工作模式是相悖的,因为插件无论如何都要找一个地方写入文件,所以比如是要打开一个文件夹才对。要么报错,要么引导用户打开文件夹,这种处理方式。

另外,我觉得 outputFolder 应该和 fileName 合并,直接改成相对路径 filePath,您觉得如何?

jdneo

jdneo commented on Aug 2, 2019

@jdneo
MemberAuthor

手工指定 workspaceFolder 感觉有点奇怪,直接使用当前打开的文件夹作为工作目录不是更自然么?

I don't think we should use the current active folder as workspaceFolder. Imagine you have opened other project in your VS Code. Generate LeetCode files in the current folder will ruin your source control.

至于没有打开文件夹的情况,这种模式和这个插件的工作模式是相悖的,因为插件无论如何都要找一个地方写入文件,所以比如是要打开一个文件夹才对。要么报错,要么引导用户打开文件夹,这种处理方式。

Yes, the current behavior will prompt the user to open the specified folder, just as you have said.

另外,我觉得 outputFolder 应该和 fileName 合并,直接改成相对路径 filePath,您觉得如何?

Hmm, currently the extension does not support customize the file name yet.

magic-akari

magic-akari commented on Aug 2, 2019

@magic-akari
Contributor

我打算修改,以便支持自定义文件名。请问是否接受 PR?

另外,是否保留 outputFolder 这个设置,我还没什么想法。

jdneo

jdneo commented on Aug 2, 2019

@jdneo
MemberAuthor

@magic-akari All the contribution is welcome! We actually have an issue for this: #166. I suggest we can discuss in that issue to address a design before the PR is sent out.

jwbecalm

jwbecalm commented on Sep 3, 2019

@jwbecalm

how to config the "leetcode.workspaceFolder" ? I want to change after my first choose, but I cannot find it in workspace settings

jdneo

jdneo commented on Sep 3, 2019

@jdneo
MemberAuthor

@jwbecalm It's in the user settings.

jdneo

jdneo commented on Sep 14, 2019

@jdneo
MemberAuthor

Close since the leetcode.outputFolder has been deprecated.

Streamlet

Streamlet commented on May 2, 2024

@Streamlet

但是现在如果我想以当前工作目录为参考的相对路径,要怎么设置呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Streamlet@jdneo@magic-akari@jwbecalm

        Issue actions

          Considering to merge 'leetcode.workspaceFolder' and 'leetcode.outputFolder' into one single setting. · Issue #372 · LeetCode-OpenSource/vscode-leetcode