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

Weird formatting for hanging binop and curried function #194

Closed
JohnnyMorganz opened this issue Jun 16, 2021 · 1 comment · Fixed by #223
Closed

Weird formatting for hanging binop and curried function #194

JohnnyMorganz opened this issue Jun 16, 2021 · 1 comment · Fixed by #223
Labels
bug Something isn't working

Comments

@JohnnyMorganz
Copy link
Owner

function foo()
  return fooooooooooooooooooo(barrr) or fooooooooooooooooooo(barrrrrrrrrrrrrr)(
    hello
  ) or bazzzzzzzzzzzzzzzzzz
end

... should be formatted as ...

function foo()
  return fooooooooooooooooooo(barrr)
    or fooooooooooooooooooo(barrrrrrrrrrrrrr)(hello)
    or bazzzzzzzzzzzzzzzzzz
end

This is at 80 column width, with indent width set to 2. Note, if indent width is set to 4, this formats as expected.

@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Jun 16, 2021
@JohnnyMorganz
Copy link
Owner Author

The issue here is actually to do with the formatting tactics for return, not the hanging formatter.
If we replace return with xxxx = (same width), then it formats as expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant