codemirror-lang-sparql
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

CodeMirror SPARQL Language Support

NPM version badge

A CodeMirror extension that provides SPARQL syntax highlighting and language support.

Note

This parser is in a usable state but not 100% in line with the spec yet

Usage

import { basicSetup } from 'codemirror';
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { sparql } from 'codemirror-lang-sparql';

const doc = `
 SELECT * WHERE { ?s ?p ?o }
`

new EditorView({
  state: EditorState.create({
    doc,
    extensions: [
      basicSetup,
      sparql(),
    ],
  }),
  parent: document.querySelector('#editor'),
});

Readme

Keywords

none

Package Sidebar

Install

npm i codemirror-lang-sparql

Weekly Downloads

16

Version

1.0.0

License

MIT

Unpacked Size

88.8 kB

Total Files

8

Last publish

Collaborators

  • aatauil