rmordechay / glsl-plugin-idea

GLSL support for JetBrains IDE's
Apache License 2.0
33 stars 11 forks source link

Syntax Highlighting for GLSL Embedded in HTML #34

Closed andonagio closed 3 months ago

andonagio commented 5 months ago

I work with a lot of GLSL that looks like this:

<script id="vshader" type="x-shader/x-vertex">
    precision mediump float;

    attribute vec4 vPosition;
    uniform mat4 cameraMatrix;
    uniform mat4 projMatrix;
    uniform mat4 modelMatrix;

    void main() {
        gl_Position = projMatrix * cameraMatrix * modelMatrix * vPosition;
    }
</script>

Is it possible to use the plugin to get GLSL syntax highlighting on the embedded code? Because the code file itself is HTML, the IDEA applications use that syntax highlighting, which means the GLSL between the script tags isn't highlighted at all. None of the language injection options seem to work, either.

I'd like to find a solution that doesn't involve putting the GLSL in a string or moving it to a separate file.

rmordechay commented 4 months ago

Hi @andonagio I'll try to find time of doing. This should not be too complicated.

andonagio commented 4 months ago

That would be fantastic! Thank you!

rmordechay commented 3 months ago

Hi @andonagio Can you provide me with more details about what framework you are using? Is it WebGL? In other words, I need to find a condition when to fire the language injection (embedding) since I don't want to inject it to any Githubissues.

  • Githubissues is a development platform for aggregating issues.