Closed
Description
set "leetcode.outputFolder": "E:/study/leetcode/${difficulty}/${tag}/${language}",
is not work
it generate file in vscode currently open workspace
version: 1.33.1 (user setup)
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 6.1.7601
LeetCode extend is latest version
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jdneo commentedon May 15, 2019
Hi @jjeejj,
The setting
leetcode.outputFolder
is to set the relative path, not an absolute path. See: https://github.com/jdneo/vscode-leetcode#settingsTo solve your problem, we have several related tracking issues here:
It could be great if you would like to give it a shot for contributing them. 😄
BTW, I'm closing this issue since it's somehow duplicated with existing issues.
jjeejj commentedon May 15, 2019
@jjeejj
i read the related source code
the config
leetcode.outputFolder
is relative current workspaceFolderIf the open workspace is inconsistent with the previous one, leetcode.outputFolder relative path corresponding actual path is different.
Why not?
if the
leetcode.outputFolder
config is absolutely path , use this path directlyif the
leetcode.outputFolder
config is relative path, join currentWorkspaceFolder pathjdneo commentedon May 15, 2019
You are correct. The config
leetcode.outputFolder
is relative current workspaceFolderJust as I have said before. If there is a setting to specify the workspace path for the leetcode files (That's what #130 talks about), then it will be confusing if
leetcode.outputFolder
can set to an absolute path, since there will be some conflicts there.jjeejj commentedon May 15, 2019
I don't think so.
I don't think
the leetcode outputFolder
andcurrent workspaceFolder
have anything to do with it.because i can open one folder in any path , use leetcode extension
if i do it , it will generator many leetcode code file in different workspaceFolder
Hard to maintain local leetcode code
jdneo commentedon May 16, 2019
The extension can detect if the path is opened in the current workspace. If not, prompt the user to open it or add it into the current workspace
Open a file which does not belong to the current workspace is the thing that I hope to get avoid. That's why I make the
outputFolder
as a relative path setting.In short:
The setting which will be added in #130 determines the leetcode specific workspace path, and it will defaults to
$home/.leetcode
leetcode.outputFolder
determines the relative path in the workspace.jjeejj commentedon May 17, 2019
that menas ,I can't use this feature right now ?
I hope the config
leetcode.outputFolder
support relative path and absolutely pathbecause I often open different projects using leetcode extension at different times