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
Copy file name to clipboardExpand all lines: README.md
+8-26Lines changed: 8 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -3,40 +3,23 @@
3
3
4
4
LeetCode brings you offer, and now Emacs brings you LeetCode!
5
5
6
-
# Dependencies
7
-
8
-
## Emacs Library
9
-
10
-
- dash.el
11
-
- request.el
12
-
- request-deferred.el
13
-
- graphql.el
14
-
- spinner.el
15
-
16
-
## External software
6
+
# Installation
17
7
18
-
- cURL
8
+
You can `package-install` it from melpa directly.
19
9
20
-
#Installation
10
+
## Manually
21
11
22
-
1. Clone this repository
12
+
1. Clone this repository and install all dependencies
23
13
2. Move it to your load-path
24
14
3. Require it in your emacs config
25
15
26
16
If you use [spacemacs](https://github.com/syl20bnr/spacemacs), there is a [leetcode-emacs-layer](https://github.com/anmoljagetia/leetcode-emacs-layer). Thanks for [Anmol Jagetia](https://github.com/anmoljagetia)!
27
17
28
18
# Configuration
29
19
30
-
You can choose to set your LeetCode account and password like this:
31
-
32
-
```elisp
33
-
(setq leetcode-account "your-account")
34
-
(setq leetcode-password "your-password")
35
-
```
36
-
37
-
Put password as plain text into your emacs config may not be a good idea, you can either read your password from somewhere else, or you can ignore this setting completely, a prompt will be given everytime you enter `M-x leetcode`.
20
+
First of all, you should have cURL installed.
38
21
39
-
You can also set your preferred LeetCode programming language and SQL by setting `leetcode-prefer-language` and `leetcode-prefer-sql`:
22
+
You can set your preferred LeetCode programming language and SQL by setting `leetcode-prefer-language` and `leetcode-prefer-sql`:
40
23
41
24
```elisp
42
25
(setq leetcode-prefer-language "python3")
@@ -47,7 +30,7 @@ All supported languages can be found in `leetcode--prefer-language-suffixes` var
47
30
48
31
# Usage
49
32
50
-
1.Execute `leetcode` command
33
+
1. Execute `leetcode` command, then Emacs will prompt you to input account and password. If login successful, Emacs will save it into a file. If you are interested in what happend here, you can check [auth-source.el](https://www.gnu.org/software/emacs/manual/html_mono/auth.html).
51
34
52
35

53
36
@@ -59,8 +42,7 @@ In leetcode problems list buffer:
59
42
| p | cursor move up |
60
43
| RET | show current problem description |
61
44
62
-
2. Press `<RET>`, show problem description, move cursor to 'solve it', press
63
-
`<RET>` again, start coding!
45
+
2. Press `<RET>`, show problem description, move cursor to "solve it", press `<RET>` again, start coding!
64
46
65
47
3. After finishing your code, you can edit testcase and execute `leetcode-try` or execute `leetcode-submit`.
0 commit comments