DanielGavin / ols

Language server for Odin
MIT License
417 stars 62 forks source link

Formatter doesn't handle array of anonymous struct #267

Closed thePHTest closed 9 months ago

thePHTest commented 10 months ago

Formatting this results in strange line breaks:

                @(static)
        keys_to_check := [?]struct {
            rl_key: rl.KeyboardKey,
            mu_key: mu.Key,
        }{{
                .LEFT_SHIFT,
                .SHIFT,
            }, {.RIGHT_SHIFT, .SHIFT}, {.LEFT_CONTROL, .CTRL}, {.RIGHT_CONTROL, .CTRL}, {.LEFT_ALT, .ALT}, {.RIGHT_ALT, .ALT}, {.ENTER, .RETURN}, {.KP_ENTER, .RETURN}, {.BACKSPACE, .BACKSPACE}}

However, it works fine if an anonymous struct isn't used

DanielGavin commented 9 months ago

Fixed