Skip to content

Smart linebreak printer for pipe chains #6380

Description

@fhammerschmidt

This is an old issue from the syntax repo. Would be still nice to have.

amiralies commented on Feb 4, 2021

They are currently being formatted based on line width.
it would be good to allow user decide whether to break line on pipes or not.

for example this code gets formatted to a single line with default line width

let bazz = foo.bars->OptionEx.arrayValues->Map.String.fromArray

I found this more readable

let bazz =
foo.bars
  ->OptionEx.arrayValue
  ->Map.String.fromArray

Ref: rescript-lang/syntax#257

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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