Hi all, I’ve setup atom following the instructions in this guide: https://gist.github.com/jasongilman/d1f70507bed021b48625 I have an issue where every time I open a .clj file, one of the plugins is automatically reformatting my code (changing indent levels, moving parens, etc). I’ve tried disabling packages one by one and I can’t seem to find the culprit. Is there an obvious explanation for this?
Resolved my issue.. the parinfer package was automatically reformatting things even while disabled. Uninstalling it completely resolved the problem.
That indicates your code is not formatted in “The Clojure Way” @bsiver 🙂
Hah, yes… that is certainly true!
I’d advise letting Parinfer do its thing and just get used to writing code the way other Clojurians expect to read it. Having a non-standard style will make your code hard to read for others. It will also get you used to reading “standard community style” code elsewhere...
Can’t say I disagree with you. It was just disconcerting at first to have every file I opened immediately changed, makes diff’ing a little irksome. But in the long term it’d be good to just bulk reformat everything into what Parinfer/the Rest of the World agree with.
For a while our team “standard” for code formatting was “whatever Emacs thinks is correct” 🙂
Since I switched to ProtoREPL, my stance is “whatever Parinfer thinks is correct”. Just one less thing to worry about.
(those two almost exactly coincide — there’s just a handful of places where Parinfer is more opinionated)
(try
(some-thing)
(catch Exception _
;; ignore this
))
gets reformatted to this (try
(some-thing)
(catch Exception _))
;; ignore this
and I can live with that(if I really cared, I could use (comment ignore this)
instead)
yes, I had a lot of instances of reformatting just like that. Coincidentally the other half of my development team uses emacs 🙂