ccagml / leetcode-extension

Solved LeetCode problem in VS Code added some new features
https://marketplace.visualstudio.com/items?itemName=ccagml.vscode-leetcode-problem-rating
MIT License
267 stars 27 forks source link

workspaceFolder 用的是绝对路径,对于有多个办公环境的场景不友好 #226

Closed M-Kepler closed 1 year ago

M-Kepler commented 1 year ago

🐛 Bug Report(错误报告)

A clear and concise description of what the bug is.(清晰简洁地描述错误是什么。)

workspaceFolder 必须是绝对路径,如果切换办公电脑后,该路径就失效了

To Reproduce(重现)

Steps to reproduce the behavior.(重现的步骤。)

Expected behavior(预期行为)

A clear and concise description of what you expected to happen.(对您期望发生的事情进行清晰简洁的描述。)

期望可以用变量,比如 workspaceFolder

Extension Output(扩展输出)

Paste here the LeetCode extension log from output channel.(将输出通道中的 LeetCode 扩展日志粘贴到此处。)

Guidance: Press Ctrl+Shift+U, and toggle the channel to LeetCode.(按Ctrl+Shift+U,将频道切换到LeetCode。)

Your Environment

ccagml commented 1 year ago

不太理解,现在配置中的workspaceFolder不能配置吗

ccagml commented 1 year ago

跟vscodez中配置的级别有关系吗? 用户/远程/工作区

M-Kepler commented 1 year ago

leetcode-problem-rating.workspaceFolder 配置必须是电脑上的路径;不能用变量;

比如我在办公电脑路径是 C:/Users/[用户名]/ 家里电脑的 [用户名] 是不同的,这样的话 leetcode-problem-rating.workspaceFolder 配置就起不到作用

不知道是否已有解决方法

ccagml commented 1 year ago

workspaceFolder 可以尝试从环境变量中读取数据 不太清楚是不是这样子,2.19.10

M-Kepler commented 1 year ago

好的,这样也可以解决,感谢解答👍