Skip to content

Paren-wrapped function args get aligned with function #385

@jfly

Description

@jfly

Description

I've found formatting surprising if I have a multiline function expression that I pass arguments too (and the whole expression is also wrapped in parens). It's a mouthful. Look at the examples.

Small example input

(
  (func-builder {
    bar = "baz";
  }) arg1 arg2
)

Expected output

(
  (func-builder {
    bar = "baz";
  })
    arg1
    arg2
)

Actual output

(
  (func-builder {
    bar = "baz";
  })
  arg1
  arg2
)

Additional context

When not enclosed in parentheses, (e.g. top-level file expression), it is formatted as:

(func-builder {
  bar = "baz";
})
  arg1
  arg2

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