Skip to content

Reduce indentation in parentheses-wrapped functions #375

@musjj

Description

@musjj

Description

Functions with attribute set arguments should have the same amount of indentation compared to regular single argument functions when wrapped in a pair of parentheses.

Small example input

{
  foo = [
    (bar: {
      baz = "foobar";
    })
    (
      { bar }:
      {
        baz = "foobar";
      }
    )
  ];
}

Expected output

{
  foo = [
    (bar: {
      baz = "foobar";
    })
    ({ bar }: {
      baz = "foobar";
    })
  ];
}

Actual output

{
  foo = [
    (bar: {
      baz = "foobar";
    })
    (
      { bar }:
      {
        baz = "foobar";
      }
    )
  ];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    Status

    Approved

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions