6.0.1 • Published 2 years ago

@replit/codemirror-lang-nix v6.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

CodeMirror Nix Mode

Run on Repl.it

A codemirror extension that adds Nix syntax highlighting and language features.

example of Nix syntax highlighting

Usage

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

new EditorView({
  state: EditorState.create({
    doc: `{ pkgs ? import <nixpkgs> {} }: pkgs.mkShell { buildInputs = [ pkgs.nodejs ]; }`,
    extensions: [basicSetup, nix()],
  }),
  parent: document.querySelector('#editor'),
});
6.0.1

2 years ago

6.0.0

3 years ago

0.20.0

3 years ago

0.19.0

3 years ago

0.19.1

3 years ago

0.19.2

3 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago