I am new to the world of Emacs, and like most ex-vimmers, I am starting with Spacemacs. I have been trying to find time to do some leetcode and would like to use the package leetcode-emacs.
I have been trying to follow the docs and have tried the following :
- I pressed
SPC SPC configuration-layer/create-layer
. - In the corresponding files that were created, in
packages.el
, I added the following code.
(defconst myleetcode-packages
'((ctable :location local)
names
(leetcode :location (recipe
:fetcher github
:repo "ginqi7/leetcode-emacs"))))
(defun myleetcode/init-ctable ()
(use-package ctable))
(defun myleetcode/init-names ()
(use-package names))
(defun myleetcode/init-leetcode ()
(use-package leetcode
:after names
:config
(setq
leetcode-path "/tmp/"
leetcode-language "python")))
I asked around on different forums and somebody on Reddit pointed out that this is happening since the package is using the names package for implementing namespaces.
That's why I added the code to import that package as well, but I am getting the exact same error as before :
Error (use-package): leetcode/:catch: Symbol’s value as variable is void: leetcode-
ELisp is so damn hard :(
leetcode-
, which has no value. Search the code you use for that variable name. It looks like the last part of the variable name is missing (unless you copied the error message wrong). – Drew Apr 17 '19 at 15:29leetcode-
that the code is trying to use as a variable (trying to get its value). That's the code with the problem. – Drew Apr 17 '19 at 19:44