PkgTemplates.jl icon indicating copy to clipboard operation
PkgTemplates.jl copied to clipboard

Add support for JuliaFormatter?

Open devmotion opened this issue 4 years ago • 2 comments

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

devmotion avatar Oct 27 '21 23:10 devmotion

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.

chriselrod avatar Dec 27 '22 01:12 chriselrod

A PR would be welcomed, if anyone can be tempted to give it a go :)

nickrobinson251 avatar Dec 27 '22 10:12 nickrobinson251