0

Recently started playing with Clojurescript in Spacemacs(emacs 26.1). I am using figwheel, I usually make a change in the *.cljs file and then test the results in the function in the REPL. I recently watched a video where someone evaluated the function in the file without having to go to the REPL. I tried to do the same using cider in spacemacs, The problem is it evaluates but does not display the results.

Below snippet is from config in my 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"]]}})

Snippet from cljs file.

(defn tes []
  (inc 1234))

(prn (tes))
(tes)

I tried evaluating (tes) and (prn (tes)), it evaluates but does not print anything in the echo area. I have cider setup in spacemacs and cider REPL running during the execution. Executing the function in cider REPL by navigating to the namespace works.

Is there anything I am missing here in order to get it working in terms of setup.

kiran6
  • 1,247
  • 2
  • 13
  • 19

1 Answers1

0

You probaly need cider-nrepl.Put the following in your ~/.lein/profiles.clj file.

{:repl {:plugins [[cider/cider-nrepl "0.18.0"]]}}
Simon Polak
  • 1,959
  • 1
  • 13
  • 21