Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter: Line break with long single pipe #1070

Open
hellos3b opened this issue Feb 1, 2025 · 0 comments
Open

Formatter: Line break with long single pipe #1070

hellos3b opened this issue Feb 1, 2025 · 0 comments

Comments

@hellos3b
Copy link

hellos3b commented Feb 1, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant