What formatter would align let binding values?

What formatter would align clojure let binding values? For example:

For example, before alignment: there is one space between A and b

[A b
 Cc d]

After alignment, to line up the b and d there is now one more space between A and b then there was before:

[A  b
 Cc d]

I have a feeling cljfmt cant do this, and maybe only zprint can, alternatively, i use emacs and i’m sure some kind of emacs align regex function might be ok here.

It seems in emacs, without LSP enabled, cider with clojure-indent-style 'align-arguments will do this in a .clj file…

But it doens’t work with let-varients like reagents r/with-let, maybe i can tell cljfmt to treat it the same way.

In emacs I use clojure-align (from clojure-mode).

1 Like