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

Question about how to disable / correct one formatting operation #290

Open
JackBoosY opened this issue Oct 11, 2023 · 0 comments
Open

Question about how to disable / correct one formatting operation #290

JackBoosY opened this issue Oct 11, 2023 · 0 comments

Comments

@JackBoosY
Copy link

Hi guys,
I have a code block that is getting unexpected results when formatting:

if (a == b) and d ~= e and ... and g then
    do_something()
end

which gives me the unexpected result:

if (a == b) and d ~=
e and ... and
g then
    do_something()
end

My expected formatting result is:

if (a == b) and
   d ~= e and
   ... and
   g then
      do_something()
end

I also modified my code to:

if (a == b) and (d ~= e) and ... and g then
    do_something()
end

but also got:

if (a == b) and 
d ~= e and 
... and g then
    do_something()
end

which IMO should be:

if (a == b) and 
   d ~= e and 
   ... and g then
       do_something()
end

My question is which option to correct this?

I tried to set no_break_after_functioncall_lp / no_keep_simple_function_one_line / align_parameter / no_use_tab / align_args but not work.

Thanks.

@JackBoosY JackBoosY changed the title Question about how to disable one formatting operation Question about how to disable / correct one formatting operation Oct 11, 2023
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