Skip to content

Opening parens make unstable/incorrect indentation for an Enum wrapping a record #2943

@pbiggar

Description

@pbiggar

Issue created from fantomas-online

Code

((Combo { e1 = "Making this long so it goes on a new line new line new line new line making it long so it goes on a new line new line" }))

Result

((Combo

  { e1 =
      "Making this long so it goes on a new line new line new line new line making it long so it goes on a new line new line" }))

Expected Result

((Combo
    { e1 =
        "Making this long so it goes on a new line new line new line new line making it long so it goes on a new line new line" }))

Problem description

AFAICT, this only happens when we have 2 parens around this, which happened in my original example because I was piping the result.

Extra information

  • The formatted result breaks my code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.
  • I would like a release if this problem is solved.

Options

Fantomas main branch at 1/1/1990

    { config with
                IndentSize = 2 }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions