Decide on a recommended automated formatter for nix files in Nixpkgs.
Prevent debate around how things should be formatted. 🤦
This repository hosts scripts and code intended to measure the different aspects of formatting.
It is divided in the following sections:
-
✔️ Idioms:
Does readability of existing code improve after formatting?
-
👾 Monsters:
Does readability of ugly code improve after formatting?
-
🥊 Discussions:
Possible points of disagreement on how we should format certain Nix expressions.
Add a file called before.nix
anywhere in this repository
and then run:
$ nix run .#format
Additionally:
- Open
repl.nix
in the editor of your choice. - Run:
$ nix run .#repl
This will show the output of formatting repl.nix
with all of the available formatters and syntax highlighting.
Every time you save repl.nix
, it will reload automatically,
like this: