LeetCode brings you offer, and now Emacs brings you LeetCode!
- Clone this repository
- Move it to your load-path
- Require it in your emacs config
You can choose to set your LeetCode account and password like this:
(setq leetcode-account "your-account") (setq leetcode-password "your-password")
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
You can also set your preferred LeetCode programming language and SQL by setting
(setq leetcode-prefer-language "python3") (setq leetcode-prefer-sql "mysql")
All supported languages can be found in
In leetcode problems list buffer:
|n||cursor move down|
|p||cursor move up|
|RET||show current problem description|
<RET>, show problem description, move cursor to 'solve it', press
<RET>again, start coding!
After finishing your code, you can edit testcase and execute
If you are unable to start Leetcode, set these variables and try again to see a full stacktrace:
(setq request-message-level 'debug) (setq request-log-level 'debug)
If you are using Windows, it is possible that
curl executable comes from
Windows\System32\curl.exe (you can check it by running
where curl in the command line), which can give the following error:
curl: option --compressed: the installed libcurl version doesn't support this
To solve this error, it is suggested to use
curl provided by Git. Add
<path to Git>\mingw64\bin to the
This package use Cask to develop, build and test.
It is a suggestion for you to use
Cask, but if you don't want to bother to use it, it's totally fine too.
Cask is a build tools for emacs lisp, you can think it of
npm for emacs lisp.
Enter project root, execute
cask install, this command will install all dependencies. After that, execute
cask emacs which will start a emacs with extra
load-path to load dependencies.