CodeMirror 6 Turtle language
Basic Turtle language support for CodeMirror 6.
This is based on the language support example and on the W3C Turtle grammar specification.
How to use
You can use it like any other Code Mirror 6 language support extension.
import { EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { basicSetup } from "@codemirror/basic-setup";
import { turtle } from "@bruju/lang-turtle";
new EditorView({
parent: document.getElementById("editorParent") || document.body,
state: EditorState.create({
doc: "",
extensions: [ basicSetup, turtle() ]
})
});