Darkyenus / glsl4idea

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

Error when using Kotlin String variables inside the GLSL String #180

Open hamoid opened 1 year ago

hamoid commented 1 year ago

Describe the bug

The GLSL plugin doesn't seem to like it if I use a Kotlin variable and insert that variable in the GLSL code. I do that to generate variations of the GLSL code (to avoid duplication) and to ensure I make no mistakes in uniform names.

To Reproduce

class A {
    private val v = "err"

    @Language("GLSL")
    private val glsl = """
        uniform float $v;
    """
}

Expected behavior Ideally the code would not be highlighted as an error.

Screenshots image

Versions