Thanks, I’ll have a look. It’s a design decision we’ve taken with Calva Formatter as well, to not need a REPL session.
@pez there's also zprint
which does a more complete reformatting of the code than cljfmt
. I've never tried it, but it looks nice.
The relevant section:
https://github.com/kkinnear/zprint#a-note-on-justifying-two-up-printing
@andre.stylianos: I have been looking at zprint
some, and it does indeed do the aligning I am after, but it was doing a bit too much to my taste and with some use case scenarios in mind that I simply do not understand. I probably should give it a second chance, though.
My idea with formatting support is to try make the as-you-type support so good that a reformatting is seldom needed. It is my OCD, probably, but if the code do not get properly formatted automatically as I type and enter new lines I can't focus very well and to have to stop and reformat the code is not to my liking. I'm unsure wether I can achieve this with either cljfmt
or zprint
, but am hoping I can, because I really do not have the time to write my own formatter. 😃
(I already did, partially, for Calva, but it is very naive and not really something to keep building on.)
I'm the same as you on that part 😛
Thankfully clojure-mode
plus running cljfmt
on save works really well for me.
Great. That is what I am trying to achieve for Calva. Wish me luck!