kamadorueda / rfc-0101

Decide on a recommended automated formatter for nix files in Nixpkgs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goal

Decide on a recommended automated formatter for nix files in Nixpkgs.

Why

Prevent debate around how things should be formatted. 🤦

About

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.

How to contribute

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:

repl-demo

About

Decide on a recommended automated formatter for nix files in Nixpkgs


Languages

Language:Nix 100.0%