@nuskey8/codemirror-lang-glsl
v1.0.1
Published
GLSL language support for the CodeMirror code editor
Readme
@nuskey8/codemirror-lang-glsl
This library provides the GLSL language support implementation for CodeMirror.
Usage
import {EditorView, basicSetup} from "codemirror"
import {glsl} from "@nuskey8/codemirror-lang-glsl"
const view = new EditorView({
parent: document.body,
doc: `precision mediump float;
void main(void) {
gl_FragColor = vec4(1.0);
}`,
extensions: [basicSetup, glsl()]
})API Reference
glsl(): LanguageSupportGLSL support, including completion for global variables, keywords, built-in variables and functions.glslCompletionSource(ctx: CompletionContext): CompletionResult | nullReturns a completion source for GLSL.
License
This library is licensed under the MIT License.
