Fork me on GitHub
#cider
<
2019-04-13
>
weavejester13:04:20

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*.

weavejester13:04:12

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

weavejester15:04:31

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.

weavejester15:04:42

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

weavejester15:04:41

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.

weavejester15:04:54

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

weavejester16:04:53

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

weavejester16:04:11

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.

weavejester21:04:02

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?

weavejester21:04:57

Ah, maybe with-current-buffer

weavejester21:04:06

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

genmeblog21:04:32

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?

genmeblog21:04:09

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