我刚开始尝试使用以下模板制作简单的cljs应用:
lein new figwheel someproject -- --reagent
我希望像普通的clj项目一样,可以在cider中使用REPL进行cljs开发。因此,我进行了一些研究,最终找到了这里:
https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
我仔细阅读了说明,并验证了所有必要的依赖项都在project.clj中(似乎不需要更改任何内容,因为该模板已经添加了所有需要的内容)。以上链接的最后一步指示我需要将以下代码添加到我的emacs配置文件中:
(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))")
现在-我是一个emacs新手,所以我使用的设置仍然是我从“Clojure for the Brave and True”学到的那个:https://github.com/flyingmachine/emacs-for-clojure。我尝试首先将上面的片段放入
~/.emacs.d/init.el
中,但每当我尝试M-x cider-jack-in ...
时,没有cider-jack-in-clojurescript
选项。 我还尝试将代码片段放入~/.emacs.d/customizations/setup-clojure.el
,这似乎更合逻辑一些,但结果相同。我真的很想能够运行这个REPL,所以任何帮助都将不胜感激。
clj-refactor
)。Brave and True的按键绑定在这里也适用,并且您可以通过按下,
(主模式)来发现其他选项并查看选项弹出。1.安装emacs。2.下载Spacemacs。3.将clojure添加到~/.spacemacs层中。 - user2609980