Skip to content

Commit 90324e6

Browse files
committed
Update README
1 parent 6d464c6 commit 90324e6

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

README.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,23 @@
33

44
LeetCode brings you offer, and now Emacs brings you LeetCode!
55

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
177

18-
- cURL
8+
You can `package-install` it from melpa directly.
199

20-
# Installation
10+
## Manually
2111

22-
1. Clone this repository
12+
1. Clone this repository and install all dependencies
2313
2. Move it to your load-path
2414
3. Require it in your emacs config
2515

2616
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)!
2717

2818
# Configuration
2919

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.
3821

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`:
4023

4124
```elisp
4225
(setq leetcode-prefer-language "python3")
@@ -47,7 +30,7 @@ All supported languages can be found in `leetcode--prefer-language-suffixes` var
4730

4831
# Usage
4932

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).
5134

5235
![leetcode](images/leetcode.png)
5336

@@ -59,8 +42,7 @@ In leetcode problems list buffer:
5942
| p | cursor move up |
6043
| RET | show current problem description |
6144

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!
6446

6547
3. After finishing your code, you can edit testcase and execute `leetcode-try` or execute `leetcode-submit`.
6648

0 commit comments

Comments
 (0)