Skip to content

iizukak/codemirror-lang-wgsl

Repository files navigation

CodeMirror 6 WGSL language package

This is a WGSL (WebGPU Shading Language) language package for CodeMirror editor.

Demo

You can try it online.

Build and Test

$ git clone [email protected]:iizukak/codemirror-lang-wgsl.git
$ cd codemirror-lang-wgsl.git
$ npm install
$ npm run prepare
$ npm test

API

Usage

You can use like below code.

import { EditorView, basicSetup } from "codemirror";

import { wgsl } from "@iizukak/codemirror-lang-wgsl";

let editor = new EditorView({
  extensions: [basicSetup, wgsl()],
  parent: document.body,
});

License Notification

This repository is based on some other libraries.