最近开始在Spacemacs中使用Clojurescript(emacs 26.1)。我正在使用figwheel,我通常在* .cljs文件中进行更改,然后在REPL中的函数中测试结果。我最近观看了一个视频,其中有人评估了文件中的功能而无需转到REPL。我尝试在spacemacs中使用苹果酒做同样的事情。问题是它评估但不显示结果。
下面的代码片段来自我的project.clj中的config
:profiles {:dev {:source-paths ["src" "env/dev/clj"]
:dependencies [[binaryage/devtools "0.9.10"]
[figwheel-sidecar "0.5.16"]
[nrepl "0.4.4"]
[cider/piggieback "0.3.9"]]}})
来自cljs文件的片段。
(defn tes []
(inc 1234))
(prn (tes))
(tes)
我尝试评估(tes)
和(prn (tes))
,它评估但不在回声区域打印任何东西。我在spacemacs中设置了苹果酒,并且在执行期间运行了苹果酒REPL。通过导航到命名空间来执行苹果酒REPL中的功能。
我在这里是否有任何东西,以使其在设置方面工作。
您可能需要cider-nrepl。在〜/ .lein / profiles.clj文件中输入以下内容。
{:repl {:plugins [[cider/cider-nrepl "0.18.0"]]}}