Solve LeetCode problems in VS Code.
NOTE: Please make sure that
Node
is in yourPATH
environment variable. You can check this by running:node -v
.
Note: To show the locked problems, please set
leetcode.showLocked
to true
1 If no folder is opened in VS Code, the extension will save the problem files in $HOME/.leetcode/
.
2 If you trigger the Submit to LeetCode
and Test in LeetCode
commands in the Command Palette, the extension will upload the current active file in editor.
This extension provides several commands in the Command Palette (F1 or Ctrl + Shift + P):
Setting Name | Description | Default Value |
---|---|---|
leetcode.hideSolved |
Specify to hide the solved problems or not | false |
leetcode.showLocked |
Specify to show the locked problems or not. Only Premium users could open the locked problems | false |
leetcode.defaultLanguage |
Specify the default language used to solve the problem. Supported languages are: bash , c , cpp , csharp , golang , java , javascript , kotlin , mysql , python ,python3 ,ruby ,scala ,swift |
N/A |
leetcode.useWsl |
Specify whether to use WSL or not | false |
leetcode.endpoint |
Specify the active endpoint. Supported endpoints are: leetcode , leetcode-cn |
leetcode |
Refer to CHANGELOG
注意: 请确保
Node
在PATH
环境变量中,您可以通过执行:node -v
进行查看。
注意: 如果想要展示付费题目,您需要将
leetcode.showLocked
设置为 true
1 如果 VS Code 中没有已打开的文件夹,插件会将题目文件存储于 $HOME/.leetcode/
目录下。
2 如果您通过命令面板触发 Submit to LeetCode
和 Test in LeetCode
命令,本插件将会提交当前文件至 LeetCode。
该插件在命令面板(F1 或 Ctrl + Shift + P)中支持下列命令:
配置项名称 | 描述 | 默认值 |
---|---|---|
leetcode.hideSolved |
指定是否要隐藏已解决的问题 | false |
leetcode.showLocked |
指定是否显示付费题目,只有付费账户才可以打开付费题目 | false |
leetcode.defaultLanguage |
指定答题时使用的默认语言,可选语言有:bash , c , cpp , csharp , golang , java , javascript , kotlin , mysql , python ,python3 ,ruby ,scala ,swift |
N/A |
leetcode.useWsl |
指定是否启用 WSL | false |
leetcode.endpoint |
指定使用的终端,可用终端有:leetcode , leetcode-cn |
leetcode |
请参考更新日志
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。