I just started playing around with making a simple cljs app using the following template:
lein new figwheel someproject -- --reagent
I was hoping to use the REPL in cider for cljs development the same way I typically would for a normal clj project, so I did some research and ended up here:
https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
I read through the instructions, and verified that all the proper dependencies are in project.clj (didn't have to change anything, looks like the template added everything I would need). The final step in the above link indicates I would need to add the following code to my emacs config:
(require 'cider)
(setq cider-cljs-lein-repl
"(do (require 'figwheel-sidecar.repl-api)
(figwheel-sidecar.repl-api/start-figwheel!)
(figwheel-sidecar.repl-api/cljs-repl))")
Now - I'm an emacs newb, so the setup I'm using is still the one I first learned on from "Clojure for the Brave and True":
https://github.com/flyingmachine/emacs-for-clojure
I tried to first put the above snippet in ~/.emacs.d/init.el
, but whenever I attempt M-x cider-jack-in ...
, there is no cider-jack-in-clojurescript
option. I also tried putting the snippet in the ~/.emacs.d/customizations/setup-clojure.el
, which seemed like a more logical home, but same result.
I'd really love to be able to get this REPL up and running, so any help would be appreciated.
clj-refactor
). The keybindings from Brave and True work there as well, and you can discover others by pressing,
(major-mode) and see options pop up. 1. Install emacs. 2. d/l spacemacs. 3. Add clojure to ~/.spacemacs layers. – Erwin Rooijakkers