You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# LeetCode.nvim Guide: Solve LeetCode Problems in Neovim
2
+
3
+
LeetCode.nvim is a powerful plugin that integrates LeetCode directly into your Neovim editor, allowing you to browse, solve, and submit LeetCode problems without leaving your favorite editor.
4
+
5
+
## Getting Started
6
+
7
+
1. Open the LeetCode interface with command:
8
+
9
+
```
10
+
:Leet
11
+
```
12
+
13
+
2. You'll need to log in to your LeetCode account the first time you run it.
14
+
15
+
## Basic Commands
16
+
17
+
-`:Leet` - Opens the main LeetCode menu
18
+
-`:Leet daily` - Open today's daily challenge
19
+
-`:Leet random` - Get a random problem
20
+
-`:Leet list` - Browse all problems
21
+
-`:Leet tabs` - Switch between open problems
22
+
-`:Leet submit` - Submit current solution
23
+
-`:Leet run` - Run current solution with test cases
24
+
-`:Leet reset` - Reset the code to default template
25
+
-`:Leet lang` - Change programming language for current problem
26
+
-`:Leet cookie update` - Update your LeetCode cookie
27
+
28
+
## Filter Problems
29
+
30
+
When using `:Leet list` or `:Leet random`, you can filter problems:
31
+
32
+
- By difficulty: `difficulty=easy/medium/hard`
33
+
- By status: `status=ac/notac/todo`
34
+
- By tags: `tags=array,string,dp`
35
+
36
+
Example:
37
+
38
+
```
39
+
:Leet list difficulty=medium status=notac
40
+
:Leet random status=todo difficulty=hard
41
+
```
42
+
43
+
## Keybindings Within LeetCode UI
44
+
45
+
These keys only work within the LeetCode interface and won't conflict with your existing keymaps:
46
+
47
+
-`q` - Toggle/close panels
48
+
-`<CR>` (Enter) - Confirm selection
49
+
-`r` - Reset test cases
50
+
-`U` - Use a custom test case
51
+
-`H` - Focus on test cases panel
52
+
-`L` - Focus on results panel
53
+
54
+
## Tips for Use
55
+
56
+
1.**Switch Languages**: Use `:Leet lang` to change your programming language for the current problem.
57
+
58
+
2.**Multiple Problems**: You can have multiple LeetCode problems open in different tabs.
59
+
60
+
3.**Code Auto-Injection**: Useful imports and boilerplate code are automatically added for common languages.
61
+
62
+
4.**Description Format**: Problem descriptions are formatted for better readability, including proper markdown rendering.
63
+
64
+
5.**Efficient Workflow**: LeetCode.nvim caches your progress, making it faster to get back to your problems.
65
+
66
+
Enjoy solving LeetCode problems without leaving your favorite editor!
0 commit comments