DFTK.jl
DFTK.jl copied to clipboard
Automatic source-code formatting
Now that JuliaFormatter is around and reasonably stable, we could easily set something up and integrate it with our workflows using a git pre-commit hook.
Not sure about running it automatically (might be a lot of hassle, and I don't trust it to be always right), but something that we run every once in a while (and check it's sensible), sure.
I use some nice plugins for python and C++ to format my source code on each write. If you get use to it it's just great. You type your code and don't care about the formatting, write and boom it looks nice. If you don't like it, you can always disable it for a region. Happens rarely, however in my experience. Also this really helps to visually detect programming errors (because the formatting looks off). Trust me, once you have this setup and got used to it, you do not want to miss it.
Yeah I have emacs doing a bunch of auto stuff also. But then its rules are going to be different from those of that formatter, and it's going to be super annoying. Plus sometimes I do know better than the automatic rule and I want to overwrite that. So let's keep it manual and run it every few months or so.