/codemirror-rego

A basic rego mode for CodeMirror and the base key-map that we use in our product.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Rego Codemirror Addons

Rego mode and minimal key map for CodeMirror that we use at Styra.

Usage

Simply import either the mode, key map, or both after importing CodeMirror. The key map also requires some additional addons to be imported first:

import CodeMirror from 'codemirror'

// Other CodeMirror addons...

import 'codemirror-rego/mode' // You can now use mode: 'rego'
// and/or
import 'codemirror/addon/comment/comment'
import 'codemirror/addon/edit/matchbrackets'
import 'codemirror-rego/key-map' // You can now use keyMap: 'styra'