clojure-emacs / orchard

A fertile ground for Clojure tooling
Eclipse Public License 1.0
323 stars 54 forks source link

Inspector - more compact delimiters #264

Closed vemv closed 2 months ago

vemv commented 2 months ago

I don't remember if this was always the case, but as of master I see ) ) ) ] ] ] ] ] sequences that take some valuable real estate:

image

(Perhaps this wasn't changed directly, but its a consequence of the improved deep printing)

I'd suggest having a :compact option or so.

Thoughts? @alexander-yakushev

alexander-yakushev commented 2 months ago

Yes, it always was exactly like this, so I reproduced this behavior in the new printer. I'm not sure why this particular look has been chosen.

The rendered code looks especially awful here. Everything else has a bit more "breathing room", I suppose. Anyway, as far as I'm aware, no other printer in Clojure uses this kind of formatting, and CIDER uses normal format in other places for rendering values (debugger, enlighten), so I had to support both in orchard.print.

I don't find much value in using a unique format in the inspector. We can slash that and have the same view everywhere.

vemv commented 2 months ago

I'd be OK with the slashing because the Inspector printing has always been sort of broken (or at least messy) in misc ways.

Users are always encouraged to further drill down anyway.

alexander-yakushev commented 2 months ago

Given that the support for both kinds of printing is already implemented, let's first make the compact one the default, with the ability to switch it, and see if anybody asks/complains.

vemv commented 2 months ago

Also SGTM!

vemv commented 2 months ago

0.25.0 has been tagged