DanielGavin / ols

Language server for Odin
MIT License
479 stars 71 forks source link

odinfmt: "Allman" brace style inserts extra new lines in switch #530

Open VladGdev opened 1 month ago

VladGdev commented 1 month ago

So far this issue specifically happens with switch statements, after every format command issued, the odinfmt adds an extra line before the curly bracket opens until it reaches maximum of 3 new lines and then stops.

Expected behavior of "Allman" brace style:

num := 1

switch num
{
        case 0:
        case 1:
}

Current behavior:

num := 1

switch num

{
        case 0:
        case 1:
}