6.0.1 • Published 1 year ago

@replit/codemirror-lang-nix v6.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

6.0.0

2 years ago

0.20.0

2 years ago

0.19.0

2 years ago

0.19.1

2 years ago

0.19.2

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago