This is a Nix grammar for the lezer parser system.
The code is licensed under an MIT license.
To watch & test, with entr installed run npm run watch
- monaco-lezer-parser - use lezer parsers in monaco-editor
- also has a grammar file for nix:
monaco-lezer-parser/grammars/nix.json
- also has a grammar file for nix:
- codemirror editor has native support for lezer parsers
- pro: lightweight, modular
- con: less mature than monaco-editor
- nixos-config-webui - web editor for nix files
- nix-eval-js - nix interpreter in javascript
- codemirror-lang-nix - nix language for codemirror editor
- syntax.grammar - nix grammar for lezer parser
this project is based on
- https://lezer.codemirror.net/docs/guide/#writing-a-grammar
- https://lezer.codemirror.net/docs/ref/
- https://github.com/lezer-parser/clojure/blob/master/src/clojure.grammar
- hard fork from commit 172cf31
- https://github.com/lezer-parser/javascript/blob/main/src/javascript.grammar
- https://github.com/lezer-parser/xml/blob/main/src/tokens.js
other Nix parsers
- https://github.com/cstrahan/tree-sitter-nix/blob/master/grammar.js
- https://github.com/NixOS/nix/blob/master/src/libexpr/parser.y
Nix language spec