nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

Having an empty multiline set as the last parameter in an application in a set puts it on an extra line

Open dasJ opened this issue 5 months ago • 2 comments

That title should describe it… sorry for the length of it.

Given this input:

{
  test = app {
  };
}

I would expect the expression not to be reformatted at all. The current master version however returns:

{
  test =
    app
      {
      };
}

Interestingly enough, having a non-expanded second argument prevents this from happening, resulting in:

{
  test = app {
  } { };
}

It does however also happen if I start with two already-expanded attrsets as the parameters:

{
  test =
    app
      {
      }
      {
      };
}

dasJ avatar Sep 17 '24 18:09 dasJ