chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
sparkofreason 2019-09-28T16:30:28.138Z

Any preferred solution for reformatting clojure in chlorine/atom? Like updating indentation, aligning map values, etc.

athomasoriginal 2019-09-28T16:34:57.139500Z

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

avi 2019-10-02T20:10:08.152500Z

Have you tried cljfmt? I’m curious how they compare.

athomasoriginal 2019-10-02T22:50:58.153400Z

I found zprint to be more customizable.

👍 1
avi 2019-10-03T01:00:53.153700Z

Good to know, thanks!

mauricio.szabo 2019-09-28T16:37:04.141500Z

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).

mauricio.szabo 2019-09-28T16:37:29.142200Z

If I really need to align things (like a "table-like documentation") I use simple-align

sparkofreason 2019-09-28T16:42:49.143Z

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.

2019-09-28T16:48:38.146600Z

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? 😅

mauricio.szabo 2019-09-28T16:50:37.148300Z

@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...

2019-09-28T16:52:00.149800Z

Thanks for the pointers! I’ll dig around. (Not that I ever copy/paste code... it’s for a friend 😋)