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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @replit/codemirror-lang-nix

Weekly Downloads

46,607

Version

6.0.1

License

MIT

Unpacked Size

337 kB

Total Files

25

Last publish

Collaborators

  • jonesit-replit
  • ltazmin_replit
  • stkenned
  • moudy
  • lhchavez
  • masad-frost
  • ryantm
  • tobyho
  • cbrewster
  • theflowingsky
  • brianpool
  • brenoafb
  • ink404
  • alexisreplit
  • replitdstewart
  • ryanweingast
  • jackyzha0
  • szymon_k
  • lopezhoracio
  • jamesaustinreplit
  • talorreplit
  • eng-service
  • daweifeng-replit
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy