0.0.2 • Published 2 years ago

@bruju/lang-turtle v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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() ]
  })
});