Cider: ClojureScript REPL does not pretty print

Created on 2 Jul 2019  ·  5Comments  ·  Source: clojure-emacs/cider

Expected behavior

That the ClojureScript REPL pretty prints like the Clojure REPL.

Actual behavior

In the Clojure REPL I get:

user> (zipmap (range 50) (range))
{0 0,
 7 7,
 20 20,

etc.

In the ClojureScript REPL I get:

cljs.user> (zipmap (range 50) (range))
{0 0, 32 32, 1 1, 33 33, 2 2, 34 34, 3 3, 35 35, 4 4, 36 36, 5 5, 37 37, 6 6, 38 38, 7 7, 39 39, 8 8, 40 40, 9 9, 41 41, 10 10, 42 42, 11 11, 43 43, 12 12, 44 44, 13 13, 45 45, 14 14, 46 46, 15 15, 47 47, 16 16, 48 48, 17 17, 49 49, 18 18, 19 19, 20 20, 21 21, 22 22, 23 23, 24 24, 25 25, 26 26, 27 27, 28 28, 29 29, 30 30, 31 31}

Steps to reproduce the problem

Jack in to both ClojureScript and Clojure with cider-jack-in-clj&cljs from a ClojureScript project (I was using the project https://github.com/oskarkv/cljsissues). Then evaluate an expression that should trigger pretty printing, such as (zipmap (range 50) (range)) in the two REPLs.

Environment & Version information

CIDER version information

;; Connected to nREPL server - nrepl://localhost:46567
;; CIDER 0.22.0snapshot (package: 20190607.2013), nREPL 0.6.0
;; Clojure 1.10.1, Java 12.0.1

Emacs version

25.2.2

ClojureScript bug help wanted high priority

Most helpful comment

I'm constantly running into this and I intend to take some time soon to work on this.

All 5 comments

Hey! While this is being resolved, I'd like to share a workaround here as well:

https://github.com/BetterThanTomorrow/calva/issues/363#issuecomment-538665282

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

I'm constantly running into this and I intend to take some time soon to work on this.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

This has been fixed in Piggieback 0.5 by @ak-coram , but the problem remains for shadow-cljs, as it doesn't use Piggieback and has to implement pretty-printing independently. I've opened a ticket there on the subject https://github.com/thheller/shadow-cljs/issues/716

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manuel-uberti picture manuel-uberti  ·  4Comments

mgrbyte picture mgrbyte  ·  8Comments

geokon-gh picture geokon-gh  ·  9Comments

Reefersleep picture Reefersleep  ·  8Comments

ukriish picture ukriish  ·  6Comments