Skip to content

Don't expand already-contracted lists if they fit on a line#237

Closed
infinisil wants to merge 1 commit intomasterfrom
less-list-expansion
Closed

Don't expand already-contracted lists if they fit on a line#237
infinisil wants to merge 1 commit intomasterfrom
less-list-expansion

Conversation

@infinisil
Copy link
Member

This fixes annoying previous expansions of e.g.

imports = [
  (mkRenamedOptionModule [ "foo" "bar" ] [ "florp" "baz" ])
];

Simpler alternative to #233

This fixes annoying previous expansions of e.g.

    imports = [
      (mkRenamedOptionModule [ "foo" "bar" ] [ "florp" "baz" ])
    ];
@github-actions
Copy link

github-actions bot commented Aug 20, 2024

Nixpkgs diff

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/formatting-team-meeting-2024-08-20/50885/1

@infinisil
Copy link
Member Author

From the meeting notes: Turns out that always allowing contracted lists also means that e.g. buildInputs don’t get expanded as desired (unless it’s already expanded) which makes the diff harder to read when adding elements in the future

@infinisil infinisil closed this Aug 20, 2024
@infinisil infinisil deleted the less-list-expansion branch August 20, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants