【问题标题】:Evaluate expression and display results in spacemacs在 spacemacs 中评估表达式并显示结果
【发布时间】:2018-09-09 05:39:47
【问题描述】:

最近开始在 Spacemacs(emacs 26.1) 中使用 Clojurescript。我正在使用figwheel,我通常在*.cljs 文件中进行更改,然后在REPL 中的函数中测试结果。我最近观看了一个视频,其中有人评估了文件中的函数,而无需转到 REPL。 我尝试在 spacemacs 中使用苹果酒做同样的事情,问题是它评估但不显示结果。

下面的 sn-p 来自我 project.clj 中的配置

: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。通过导航到命名空间来执行 cider REPL 中的函数。

为了让它在设置方面正常工作,我这里有什么遗漏吗?

【问题讨论】:

    标签: clojurescript spacemacs cider


    【解决方案1】:

    您可能需要 cider-nrepl。将以下内容放入您的 ~/.lein/profiles.clj 文件中。

    {:repl {:plugins [[cider/cider-nrepl "0.18.0"]]}}
    

    【讨论】:

      猜你喜欢
      • 2019-07-19
      • 1970-01-01
      • 2019-11-29
      • 2013-12-21
      • 1970-01-01
      • 2011-07-22
      • 2021-11-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多