leetcode-editor
Introduction: Do Leetcode exercises in IDE, support leetcode.com and leetcode-cn.com, to meet the basic needs of doing exercises.Support theoretically: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
Tags:
Introduction
Solve LeetCode problems without leaving your IDE. LeetCode Editor supports
leetcode.com and leetcode.cn for problem browsing, local debugging, and submissions.
It is designed for JetBrains IDEs, including IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RubyMine, AppCode, CLion, GoLand, DataGrip, Rider, MPS, and Android Studio.
- English documentation
- 中文文档
- Login Help
- Custom Code (example)
- More open functionality: shuzijun/lc-sdk
Getting Started
Local debugging
Installation (help)
- Install from the JetBrains Marketplace.
- Download a package from GitHub Releases.
- Support the project with LeetCode Editor Pro.
Configuration
- Path:
File→Settings→Tools→LeetCode Plugin URL options: Chooseleetcode.comorleetcode.cn.Code Type: Java, Python, C++, Python 3, C, C#, JavaScript, Ruby, Swift, Go, Scala, Kotlin, Rust, PHP, Bash, or SQL.LoginName/Password: Credentials for the selected site.Temp File Path: Directory for generated temporary files.proxy (HTTP Proxy): Configure atFile→Settings→Appearance & Behavior→System Settings→HTTP Proxy.Custom code template: Customize generated code (details, example).LevelColour: Customize problem-difficulty colors; restart the IDE after changing it.
Problem Navigator
- Toolbar
Sign in: Configure an account for the selected website. Accounts for the two sites are independent.
Sign out: Exit the current account. If sign-in fails, try signing out first.
Refresh: Load problems without signing in; submitting still requires an account.
Pick: Open a random problem.
Find: Open the panel for searching, filtering, and sorting.
Session: View or switch sessions.
Toggle List: Switch between All Problem List, Paginated Problem List, and CodeTop Problem List.
Settings: Open the configuration page.
Clear: Remove files from the cache directory for the current website. Use it carefully when work has not been submitted.
Context Menu
- Problem menu: Right-click a problem to use the following actions:
- Open question: Open the problem; double-clicking a problem does the same.
- Open content: Show the description and images (requires Markdown support).
- Open solution: Show the official solution.
- Open in web: Open the problem in a browser.
- Submit: Submit the current solution.
- Submissions: View submission records and select Show detail in the pop-up window.
- Run Code: Run the default test case for the problem.
- Testcase: Create custom test cases.
- Favorite: Add or remove the problem from favorites.
- Note: Open notes for the problem.
- Timer: Track solving time in the status bar.
- Clear cache: Remove cached files for the current problem.
- Editor menu: Right-click in the editor to access the same actions.
- Question editor tabs: Content shows the description and images, Solution shows the solution, Submissions shows submission records, and Note shows notes.
