Skip to content

About

CUE language support for CodeMirror

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

codemirror-lang-cue

NPM Version

This package implements CUE language support for the CodeMirror code editor.

Getting Started

Installation

npm i codemirror-lang-cue

Usage

import {EditorView} from '@codemirror/view';
import {EditorState} from '@codemirror/state';
import {cue} from "codemirror-lang-cue";

const state = EditorState.create({
	doc: 'my cue code',
	extensions: [
		cue(),
	]
});

const view = new EditorView({
	parent: document.querySelector('#editor'),
	state
});

Language-version compatibility

The parser is version-agnostic. It accepts supported legacy and experimental syntax, leaving language-version and experiment validation to the CUE toolchain.

Testing

pnpm test

Tests include vendored upstream CUE fixtures, with a pinned source revision and a reproducible importer. No network is needed to run them.

Example

CUE syntax highlighting example

About

CUE language support for CodeMirror

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages