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

Leave opening parentheses on the same line #1407

Open
ag-eitilt opened this issue Aug 29, 2023 · 0 comments
Open

Leave opening parentheses on the same line #1407

ag-eitilt opened this issue Aug 29, 2023 · 0 comments
Labels
enhancement New feature or request wake-format

Comments

@ag-eitilt
Copy link
Collaborator

Currently, the formatter explodes parenthesized expressions such that the opening and closing parentheses both get their own lines. I will admit this is slightly better in verticalized constructors when every argument has been given its own line, but in (what I expect to be more common) cases where the expression is one of only a small number of arguments, putting the open parenthesis on its own line is reminiscent of the debate over C/C++ {.

For reference, the current output (ignoring the fact that this would be one-lined due to being less than the max width) would be:

    checkJFields
    (
        Nil
    )
    ( 
        "OptionalField" :-> checkJString,
        Nil
    )
    settings

... and I'm proposing:

    checkJFields (
        Nil
    ) ( 
        "OptionalField" :-> checkJString,
        Nil
    )
    settings
@ag-eitilt ag-eitilt added enhancement New feature or request wake-format labels Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wake-format
Projects
None yet
Development

No branches or pull requests

1 participant