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

Keep beginning braces in one line #306

Open
vkatsuba opened this issue Jun 2, 2022 · 0 comments
Open

Keep beginning braces in one line #306

vkatsuba opened this issue Jun 2, 2022 · 0 comments
Labels
configuration idea style change Improvements on a formatter style

Comments

@vkatsuba
Copy link
Contributor

vkatsuba commented Jun 2, 2022

Currently, formatter add new like and try keep braces at the same like with items, fields:
Record

-record(z_msg_v1,
        {qos = 0 :: 0 | 1 | 2,
         dup = false :: boolean()
}

Maps

-define(xxx,
        #{
            a => 1
            b => 2
        }).

I would like it to be formatted like:
Record

-record(z_msg_v1, {
        qos = 0 :: 0 | 1 | 2,
        dup = false :: boolean()
}

Maps

-define(xxx, #{
        a => 1
        b => 2
 }).

I suppose it would be great to add additional rule like: keep_braces_at_line => true or similar.

Regards,
--V

@vkatsuba vkatsuba added configuration idea style change Improvements on a formatter style labels Jun 2, 2022
@vkatsuba vkatsuba changed the title Keep curly braces in one line Keep beginning braces in one line Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration idea style change Improvements on a formatter style
Projects
None yet
Development

No branches or pull requests

2 participants