Darkyenus / glsl4idea

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

Curious if this was still being updated. #141

Closed Dai696 closed 5 years ago

Dai696 commented 5 years ago

I noticed the last official update was from 2017, altho I see a few updates within this repository.

I was curious if this was still actively being worked on as I was hoping we could get support for removing errors from glsl sub modules.

image

I have my shared glsl in modules which I share across shaders.

I simply import this into another stringed code and use a Language Reference with glsl for syntax highlighting

image

The problem is that this plugin sadly doesn't know if I'm using a piece of glsl code as a sub module or a full shader script, thus throws errors.

image

I absolutely love this plugin tho, thank you so much for it!

I was hoping we could add a way to have this script know the difference or if you knew any work arounds.

Darkyenus commented 5 years ago

The plugin is being maintained (i.e. if IntelliJ API changes and the plugin breaks, I will fix it), but I sadly don't have enough time to work on more features. That said, if you provide a PR for this, I'll review and merge it.

From the screenshots I am not entirely sure how are your files set up. But as a workaround, you can try to disable inspections for these files, by clicking the "policeman" icon, at the right side of the bottom status bar.

Dai696 commented 5 years ago

That fixed the error showing up in the hierarchy!

image

But not the actual file itself (likely due to needing some sort of pr fix)

Unfortunately I'm unsure as to where I'd need to look to make this sort of fix.

Thank you for your help and amazing plugin!

Darkyenus commented 5 years ago

IDE is lazy in this respect and tries to show the last error info it had before the error highligthing was disabled. If you invalidate its cache afterwards, for example by Ctrl-A, Ctrl-X, Ctrl-V, the errors in the file should go away.

As for how to fix it - I don't know what would be the expected outcome. Plugin could maybe detect some special comment (//ide-pragma disable errors ?) which would disable error highlighting in the file. But it would be a nontrivial amount of work, sadly.

Darkyenus commented 5 years ago

Create a feature request with specific feature outline or PR, if you want something with this.