PkgTemplates.jl
PkgTemplates.jl copied to clipboard
Add support for JuliaFormatter?
More and more packages seem to use JuliaFormatter to enforce a specific code style. Maybe support for JuliaFormatter could be added to PkgTemplates? This could mean e.g. to support creating a .JuliaFormatter.toml file with some default style (e.g., style = blue, in particular if the Blue style badge is used) and a Github action that checks the format and provides suggestions in PRs (only if not made from a fork though: https://github.com/JuliaDiff/ChainRulesCore.jl/issues/489).
I'd like to second this.
I've configured my editor to format on save, and for some reason the default formatter settings it uses are really bad (i.e., 8 spaces per tab), so I have to create a .JuliaFormatter.toml file in every repo where I want to save a file.
Of course, I could turn off the auto formatter, or maybe I could get it to only format if it finds a .JuliaFormatter.toml...
But for now, I think it'd be nice if .JuliaFormatter.tomls were more widespread.
A PR would be welcomed, if anyone can be tempted to give it a go :)