A Codemirror language extension for circom.
Table of Contents Installâ ï¸ This extension is very rough alpha-quality! There are almost certainly bugs.
npm i codemirror-lang-circom
Usage
import { EditorState } from "@codemirror/state" import { EditorView } from "@codemirror/view" import { circomLanguage } from "codemirror-lang-circom" import { basicSetup } from "@codemirror/basic-setup" import { defaultHighlightStyle } from "@codemirror/highlight" import { keymap } from "@codemirror/view" import { defaultKeymap } from "@codemirror/commands" const view = new EditorView({ state: EditorState.create({ extensions: [ circomLanguage, basicSetup, defaultHighlightStyle, keymap.of(defaultKeymap), ], }), parent: document.querySelector("#editor"), })
You can find documentation for the LR parser interface on the Lezer website.
APIimport type { LRLanguage } from "@codemirror/language" export const circomLanguage: LRLanguageContributing
This is still under active development so I'm probably not interested in issues or PRs until it stabilizes a little.
LicenseGPLv3 © 2021 Joel Gustafson
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4