- Notifications
You must be signed in to change notification settings - Fork0
Solve LeetCode problems in VS Code
License
python6460/vscode-leetcode
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Solve LeetCode problems in VS Code
- VS Code 1.23.0+
- Node.js 8+
NOTE: Please make sure that
Node
is in yourPATH
environment variable. You can check this by running:node -v
.
Simply click
Sign in to LeetCode
in theLeetCode Explorer
will let yousign in with your LeetCode account.You can also use the following command to sign in/out:
- LeetCode: Sign in
- LeetCode: Sign out
By clicking the button
at theexplorer's navigation bar, you can switch between different endpoints.
The supported endpoints are:
- leetcode.com
- leetcode-cn.com
Note: The accounts of different endpoints arenot shared. Please make sure you are using the right endpoint. The extension will use
leetcode.com
by default.
Right click the problem in the
LeetCode Explorer
and selectShow Problem
will generate a new file with the problem description for you.Note: If no folder is opened in VS Code, the extension will save the problem files in$HOME/.leetcode/.
- You can submit the answer by clicking
🙏 Submit to LeetCode
at the bottom of the file. Or you can trigger the command:LeetCode: Submit to LeetCode to submit theactive file as the answer.
Totest your answer, right click in the editor and select
Test in LeetCode
.There are 3 ways to test the answer:
- Test with the default cases
- Write test cases in input box
- Test with the written cases in file
- To manage your LeetCode sessions, just clicking the
LeetCode: ***
at the bottom of the status bar. You canswitch between sessions orcreate a new session.
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 |
leetcode.outputFolder | Specify the relative path to save the problem files. Besides using customized path, there are also several reserved words which can be used here:
| N/A |
When you meet any problem, you can check theTroubleshooting Page first.
Refer toCHANGELOG
- This extension is based on@skygragon'sleetcode-cli open source project.
- Special thanks to ourcontributors.
About
Solve LeetCode problems in VS Code
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- TypeScript100.0%