Fork me on GitHub

I’m trying to start a custom Clojurescript REPL in CIDER, but it doesn’t appear to do anything. My guess is that it’s hanging in some way. I’ve tried running the same command in cider-cljs-repl-types in a Leiningen REPL, and it starts up and hooks into the browser correctly. Are there any logs or ways of debugging this? There’s nothing in *messages*.


(Incidentally, thanks for adding in documentation for how to override cide-cljs-repl-types with .dir-locals.el)


Oh, interesting. When I use cider-connect-cljs on an existing REPL, I get a “pending” cljs REPL, though it’s one that actually works. So I need to tell CIDER somehow that the REPL is ready.


Ah, that was solved just by adding in dependencies to cider-nrepl.


So this is odd: when I copy the Leiningen startup line directly from *messages*, run it in a terminal, then connect with cider-connect-cljs, everything works.


But if I use cider-jack-in-cljs it just hangs.


Ah, it has to do with whether Emacs already has a nREPL process running. If they’re siblings, it seems to have a problem.


Might be a known issue. Okay, looks like I’ll need to use cider-connect instead, as cider-jack-in doesn’t seem to like two processes for the same project.


Is there a way of forcing a command to happen in the Clojure REPL? If I’m editing a cljs file, is there a way of telling cider-ns-refresh to refresh the clj parts of my project?


Ah, maybe with-current-buffer


(with-current-buffer (cider-current-repl 'clj)


my turn 🙂 when I eval (println "something\nanything") result is properly printed in the REPL buffer. Is there any way to print to comment in the clj buffer instead?


;; => "something\nanything"
(with-out-str (println "something\nanything"))
;; => "something\nanything\n"
;; I need:
;; something
;; anything