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

when de-piping an assignment, try to fit it on one line #181

Closed
novaugust opened this issue Jun 14, 2024 · 2 comments · Fixed by #197
Closed

when de-piping an assignment, try to fit it on one line #181

novaugust opened this issue Jun 14, 2024 · 2 comments · Fixed by #197
Labels
enhancement New feature or request

Comments

@novaugust
Copy link
Contributor

novaugust commented Jun 14, 2024

Example Input

# given      
x =
  y
  |> Enum.map(&f/1)
  |> Enum.join()

# we get
x =
  Enum.map_join(y, &f/1)

# we want
x = Enum.map_join(y, &f/1)
@novaugust novaugust added the enhancement New feature or request label Jun 14, 2024
@janpieper
Copy link

Even without de-piping, I would be happy to see styler format it into one line.

x = 
  Enum.map_join(y, &f/1)

should become

x = Enum.map_join(y, &f/1)

@novaugust
Copy link
Contributor Author

amen to that. always wished the formatter would move things up if you increased line length in a codebase, or updated a line to be less long (hence styler!)
i'll spike on that when i work on this issue and see if it can't happen together, thanks for the suggestion

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

Successfully merging a pull request may close this issue.

2 participants