nix-init icon indicating copy to clipboard operation
nix-init copied to clipboard

Use nixfmt-rfc-style post-codegen to ensure consistent formatted output

Open pluiedev opened this issue 1 year ago • 1 comments

Instead of trying to embed whitespace and formatting into the builders themselves, why not just emit a minimized yet syntactically correct file and properly format it with nixfmt-rfc-style (or whatever formatter the user wants e.g. Alejandra)? This will massively simplify the codebase and leave concerns of style and formatting to other tools that are tailor-made for that task, IMO

pluiedev avatar Nov 11 '24 19:11 pluiedev

Now that nixpkgs is fully formatted, this would be helpful to have. I just ran into an issue where a multi-item list wasn't formatted properly and I had to go back and amend the commit.

adamcstephens avatar Apr 03 '25 16:04 adamcstephens