by simongray · 1y ago · 0 comments
When you start out with Clojure/Lisp and you aren't totally used to parenthesis you can just use Parinfer to get editor behaviour similar to developing Python. It removes a major pain point of migrating to a Lisp. It used to be the case that you were forced to learn Paredit pretty much from the start.
However it also made me very strict and opinionated about formatting. One of the main downsides of parinfer comes when you have to interact with someone else's poorly indented or opinionated (wrongly) formatting that goes against the clojure style guide. Parinfer can then ruin otherwise working code because things are out of alignment. To fix this, I set up a function to force format files on open, which mostly works but then for the longest time made me the source of a lot of white space commits. It also struggles with egregiously long files.
Thankfully I eventually got my team on board with force formatting all files and treating non standard formatting as linting errors. We also cut down the largest files one of the other devs made, and that helped a lot.
I started part-time in Clojure in 2011 and full-time in 2014. I've never felt like I needed any extra tooling for parens. Instead of typing `foo(x)`, I type `(foo x)`. It seems...almost exactly the same to me.
Same with text editors: people will say you need emacs, Cursive, etc. but I just use vim for Clojure, as well as everything else. It works great.
I tend to move around parens quite a lot while developing, constantly refactoring, so some kind of structural editing was necessary for me from the get-go.
When I tried this in vscode it was problematic