clojure-emacs / orchard

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

[inspect] Right-align indices when rendering indexed collections #202

Closed alexander-yakushev closed 1 year ago

alexander-yakushev commented 1 year ago

When inspecting a linear collection, the indices cause an ugly indentation shift on digit promotions (9->10, 99->100). This PR fixes this. Here's now it looks currently:

image

Here's how it looks after the patch:

image

In the future, we might want to do the similar for associative collections, but I think it's a more contentious topic. Some people don't like their values aligned to keys if it causes a large gap on the other side (me included). But aligning indices shouldn't be controversial since most of the time it's gonna be 1 space, 2 spaces at the very most in the edge case.

alexander-yakushev commented 1 year ago

Ready.