8000 Sort set attributes alphabetically · Issue #276 · kamadorueda/alejandra · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Sort set attributes alphabetically #276
Open
@KAction

Description

@KAction

In some case it would be convenient to have attribute set to be automatically sorted (think something like all-packages.nix).
Sure, since attribute name can be arbitrary expression there is no way to handle every case, but for simple {b = 10; a = 15; } that should make sense. Clearly not every set should be sorted, so probably it should be opt-in with some comment or something like that.

I implemented this feature for nixfmt (NixOS/nixfmt#61), any change to see it in alejandra?

Also, I would love to have lists sorted too. Again, opt-in only, but automatically sorting buildInputs would be great.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0