DanielGavin / ols

Language server for Odin
MIT License
439 stars 67 forks source link

`odinfmt` doesn't wrap long, multi switch cases #367

Closed thetarnav closed 5 months ago

thetarnav commented 5 months ago

Currently this:

main :: proc() {
    switch e {
    case .Long_Ass_Member_Name, // one
         .Another_Long_Ass_Member_Name, // two
         .Another_Another_Long_Ass_Member_Name, // three
         .Another_Another_Another_Long_Ass_Member_Name: // four
        // cool
    }
}

Gets formatted to this:

main :: proc() {
    switch e {
    case .Long_Ass_Member_Name, .Another_Long_Ass_Member_Name, .Another_Another_Long_Ass_Member_Name, .Another_Another_Another_Long_Ass_Member_Name: // one// two// three// four
    // cool
    }
}
DanielGavin commented 5 months ago

Should be fixed now.