Skip to content

Formatter: Line break with long single pipe #1070

Open
@hellos3b

Description

@hellos3b

When working with a long module name (typically when using Something__Namespaced), if you use a single pipe it will break line at the argument:

let long =
  SomeLongModuleName.make("Lorem Ipsum es simplemente")->SomeLongModuleName.map(
    updateFooToBar,
  )

This is more difficult to read than if it broke line on the pipe:

let long =
  SomeLongModuleName.make("Lorem Ipsum es simplemente")
  ->SomeLongModuleName.map(updateFooToBar)

I would love it if at the very least I can make the decision myself by introducing a newline, similar with how 2+ pipes will auto break or not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions