@bruju/lang-turtle
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @bruju/lang-turtle

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

34 kB

Total Files

8

Last publish

Collaborators

  • bruju