Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aatauil/codemirror-lang-turtle
TURTLE grammar for Lezer parser
https://github.com/aatauil/codemirror-lang-turtle
codemirror6 lezer-grammar rdf semantic-web turtle
Last synced: 18 days ago
JSON representation
TURTLE grammar for Lezer parser
- Host: GitHub
- URL: https://github.com/aatauil/codemirror-lang-turtle
- Owner: aatauil
- License: mit
- Created: 2023-05-15T14:22:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-16T09:38:35.000Z (over 1 year ago)
- Last Synced: 2024-12-03T00:34:38.611Z (20 days ago)
- Topics: codemirror6, lezer-grammar, rdf, semantic-web, turtle
- Language: TypeScript
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CodeMirror TURTLE Language Support
A CodeMirror extension that provides Turtle syntax highlighting and language support.
### Usage
```ts
import { basicSetup } from 'codemirror';
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { turtle } from 'codemirror-lang-turtle';const doc = `
@prefix rdf: .
@prefix dc: .
@prefix ex: .dc:title "RDF/XML Syntax Specification (Revised)" ;
ex:editor [
ex:fullname "Dave Beckett";
ex:homePage
] .
`new EditorView({
state: EditorState.create({
doc,
extensions: [
basicSetup,
turtle(),
],
}),
parent: document.querySelector('#editor'),
});
```