Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
100 stars 30 forks source link

Improved indentation for multi-line call and switch case #184

Open Luna5ama opened 1 year ago

Luna5ama commented 1 year ago

Multi-line call, aka. continuation indent in IDEA setting

Before:

vec3(
1.0,
2.0,
3.0
)

After, with continuation indent of 8 (default):

vec3(
        1.0,
        2.0,
        3.0,
)

Switch case

Before:

switch (i) {
    case 0:
    foo();
    break;
    case 1:
    bar():
    break;
    default:
    baz();
    break;
}

After:

switch (i) {
    case 0:
        foo();
        break;
    case 1:
        bar():
        break;
    default:
        baz();
        break;
}