Newfoundland Pitbull Mix

    @replit/codemirror-lang-nix
    TypeScript icon, indicating that this package has built-in type declarations

    6.0.0 • Public • Published

    CodeMirror Nix Mode

    Run on Repl.it NPM version

    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'),
    });

    Keywords

    none

    Install

    npm i @replit/codemirror-lang-nix

    DownloadsWeekly Downloads

    815

    Version

    6.0.0

    License

    MIT

    Unpacked Size

    335 kB

    Total Files

    21

    Last publish

    Collaborators

    • alexisreplit
    • ink404
    • brianpool
    • tobyho
    • brenoafb
    • xiaoyiatreplit
    • giuseppeatreplit
    • masad-frost
    • lincolnreplit
    • stkenned
    • jnnnthnn-at-replit
    • alex-jungle-cat
    • replitmatt
    • cbrewster
    • wadeatreplit
    • ltazmin_replit
    • jeremypress
    • moudy
    • schestakov
    • lhchavez
    • slmjkdbtl
    • lunaroyster