nolanderc / glsl_analyzer

Language server for GLSL (autocomplete, goto-definition, formatter, and more)
GNU General Public License v3.0
188 stars 5 forks source link

Weird closing bracket formatting on array literals #61

Closed Devon7925 closed 2 months ago

Devon7925 commented 4 months ago
struct HeightData {
    float offset;
    float scale;
    float impact;
};

const HeightData height_data[] = {
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.2, 2.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.4, 7.0, 0.2),
    HeightData(0.6, 20.0, 0.5),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.8, 2.0, 0.35),
    HeightData(0.1, 1.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.0, 0.0, 0.0),
};

Formats to

struct HeightData {
    float offset;
    float scale;
    float impact;
};

const HeightData height_data[] = {
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.2, 2.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.4, 7.0, 0.2),
    HeightData(0.6, 20.0, 0.5),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.8, 2.0, 0.35),
    HeightData(0.1, 1.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.0, 0.0, 0.0),
    };

This looks wrong to me.