Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aatauil authored Mar 2, 2023
1 parent 1b548a4 commit de4ba48
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
lezer-sparql
# CodeMirror SPARQL Language Support [alpha]

<span><a href="https://www.npmjs.com/package/@replit/codemirror-lang-solidity" title="NPM version badge"><img src="https://img.shields.io/npm/v/codemirror-lang-sparql?color=blue" alt="NPM version badge" /></a></span>

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

## Note
This parser is not yet ready to be used. A lot still needs to happen, do not use in production.

### Usage

```ts
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'),
});
```

0 comments on commit de4ba48

Please sign in to comment.