rmordechay / glsl-plugin-idea

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

support glsl inside other ext file content #8

Closed chen1zee closed 1 year ago

chen1zee commented 2 years ago

for example,I am working in aaa.js , writing JavaScript, using three.js. inside aaa.js , I have part of GLSL code, for example:

const thisIsJs = '123';
const someShaderStr = `
#include <common>
# .... glsl code
`

can someShaderStr has GLSL highLight?

xiaozhuai commented 2 years ago

Jetbrains' already contains a feature called language injection Use language injection comments

Here is a c++ code snippet

image

And for js

image
rmordechay commented 2 years ago

@chen1zee sorry for the late reply. Seems like @xiaozhuai found a pretty elegant solution for that that I wasn't aware of. Hope that'll work for you. thank you @xiaozhuai!