Fork me on GitHub
#cider
<
2021-07-13
>
robert-stuttaford07:07:06

how do i get pretty printing in *cider-result* for clojure*script* repls? it's already working in my clojure repl.

enn21:07:34

I see that at one point there was a cider-repl-print-length customize variable, but it doesn’t seem to exist any longer. With Leiningen, it was possible to set this value in project.clj. The suggested (by Alex Miller) means of doing the same thing with deps.edn is {:main-opts ["-e" "(set! *print-length* 100)"]} . However, this doesn’t work with CIDER for me, presumably because the nREPL server is running in a different thread than the one in which that set! is run. Any tricks for getting this set by default in my CIDER REPLs?

enn21:07:26

ah, interesting, thanks for the clue. we don’t use one of the standard pretty printers, so it would be nice if there were a way to manipulate *print-length* itself, but maybe I can figure out a workaround.

enn21:07:41

(we use a pretty printer which plays more nicely with Datomic entity maps)