Any preferred solution for reformatting clojure in chlorine/atom? Like updating indentation, aligning map values, etc.
I have used https://atom.io/packages/zprint-atom -> I am not sure if the package has been updated with latest code, but zprint is a powerful formatting tool. It is the closest thing I believe clojure has to https://prettier.io/ for JS
Have you tried cljfmt? I’m curious how they compare.
I found zprint to be more customizable.
Good to know, thanks!
I use lisp-paredit for updating indentation (it just doesn't work too well with protocolos/records). As for aligning map values, I don't really like the practice (it also confuses me a lot when I read code like this, I can't map the keys to values, so I simply don't use).
If I really need to align things (like a "table-like documentation") I use simple-align
I'll give zprint a try. I was using clojure-indent, seems to have some odd behavior, maybe due to interaction with parinfer or lisp-paredit.
So, the question of pasting code and having it automatically indented as if it was part of the above form... how do I avoid it? Tried “parinfer disable”, switched to plain text mode, didn’t help. How hard can it be? 😅
@mattias504 there's a bunch of configurations on Atom that may be causing the issue: look at the editor settings, there's a "Auto indent on paste" that may be causing the issue. On lisp-paredit
there's the strict config that may be contributing to it too...
Thanks for the pointers! I’ll dig around. (Not that I ever copy/paste code... it’s for a friend 😋)