{"_id":"@codincod/codemirror-lang-nix","_rev":"5-0f5c532a2ef046c2b02e0346ffcb7198","name":"@codincod/codemirror-lang-nix","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@codincod/codemirror-lang-nix","version":"0.1.0","keywords":["editor","code","nix","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-nix@0.1.0","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"dist":{"shasum":"80aa4916a945bc1faab42c229137f5604c4114dc","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-nix/-/codemirror-lang-nix-0.1.0.tgz","fileCount":10,"integrity":"sha512-rMXCtKrQshdpJ8EBsV0O0j40bPG1qGtd4U4CWwK/Lq+xrQDdYQ8CXQt1z7vhsJpv4Cfzle0pivwM3P/kaDNrrg==","signatures":[{"sig":"MEUCIQDKfnZBZkiLgXR1D98lB1ntYBP0kbuGal3nuV8HYzvb8gIgaz5UyLyb1tyK6aVKK7W2WlizkVasaFDxnS6CQKPjhp8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45671},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"b8d5f1afc32e074f7ddee4ed98fd794acc728ff3","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"cm-buildhelper src/index.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-nix.git","type":"git"},"_npmVersion":"11.6.2","description":"Nix language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/view":"^6.0.0","@lezer/generator":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/buildhelper":"^0.1.16"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-nix_0.1.0_1785175187350_0.0038748741990670688","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codincod/codemirror-lang-nix","version":"0.1.1","keywords":["editor","code","nix","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-nix@0.1.1","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"c63e580c910ab87c4a62889656f5c47268d93144","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-nix/-/codemirror-lang-nix-0.1.1.tgz","fileCount":10,"integrity":"sha512-9XBy2YzZWHzCEq+R4vRWmP4Xjz40Ej6jtSZr0jiceLOBR4gnznb+8/vP7Nf8Aq6IbcNSU8RJ1W6awTot60+j7Q==","signatures":[{"sig":"MEQCID31sdTwUzTsdX7tywxJAxTPdIyAv1cp3O+N9QHCI72aAiBZx/dfmHGR8152NuMBhzYvCeJL9dHJI5VtoMAG1WqfXQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45850},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"338fc207011e4b5d622dc554f8187f1c91678971","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"cm-buildhelper src/index.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"git+https://codeberg.org/reeven/codemirror-lang-nix.git","type":"git"},"_npmVersion":"11.6.2","description":"Nix language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/view":"^6.0.0","@lezer/generator":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/buildhelper":"^0.1.16"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-nix_0.1.1_1785286747940_0.05929174967576478","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@codincod/codemirror-lang-nix","version":"0.1.2","keywords":["editor","code","nix","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-nix@0.1.2","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"04cc300092fa5aa8b2de397367e5b8ce3fe19351","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-nix/-/codemirror-lang-nix-0.1.2.tgz","fileCount":10,"integrity":"sha512-nn9vEBufTE6sHN4V4jFvh3g2yG1o34FlGqFQU0zNxqldyGfjfg7iKKYDKnGu0YtirySbUYAIzQ38mchrcqGcQw==","signatures":[{"sig":"MEQCIC87IMPbwLNLbrAfG2MXqDVolTcNBB7i0IGGf03llPdYAiAkauPNEPUpqbsvkNMPmV3pSPptaHFc7Z8zxMqc9nie9w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45842},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"338fc207011e4b5d622dc554f8187f1c91678971","scripts":{"test":"npm run build && node --test \"test/*.test.ts\"","build":"cm-buildhelper src/index.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-nix","type":"git"},"_npmVersion":"11.6.2","description":"Nix language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/view":"^6.0.0","@lezer/generator":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/buildhelper":"^0.1.16"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-nix_0.1.2_1785970527074_0.27900574953414004","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@codincod/codemirror-lang-nix","version":"0.1.3","keywords":["editor","code","nix","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","_id":"@codincod/codemirror-lang-nix@0.1.3","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"homepage":"https://codincod.com/","dist":{"shasum":"2ea36742852a0c69699ed521140d4f16d3ba2afe","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-nix/-/codemirror-lang-nix-0.1.3.tgz","fileCount":10,"integrity":"sha512-n5rckDFhEYH6cNQB+GZu5UAhoHpXRBL0s27jd+KyGx9pwnE1jk8WIigMtxwljx81vbXbEUQnAU148CY6SKT3lA==","signatures":[{"sig":"MEYCIQDOS+tjygmAVcWGu5Nial2qs0m2ca27VTRtI+D8Dfu5YgIhAOlfQqfdv4NodNkXcingSQuD2Vpy/RkhOsgXf55hQUv6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46220},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"3fde1359d1043b54226adfb90ca7e10610589fbb","scripts":{"fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz","test":"npm run build && node --test \"test/*.test.ts\"","build":"cm-buildhelper src/index.ts","corpus":"npm run build && node test/corpus.ts","prepare":"npm run build"},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"repository":{"url":"https://codeberg.org/reeven/codemirror-lang-nix","type":"git"},"_npmVersion":"11.6.2","description":"Nix language support for the CodeMirror code editor","directories":{},"sideEffects":false,"_nodeVersion":"25.0.0","dependencies":{"@lezer/lr":"^1.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@codemirror/language":"^6.0.0","@codemirror/autocomplete":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@codemirror/view":"^6.0.0","@lezer/generator":"^1.0.0","@codemirror/state":"^6.0.0","@codemirror/buildhelper":"^0.1.16"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-nix_0.1.3_1786488724806_0.6213195414215493","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codincod/codemirror-lang-nix","version":"0.2.0","description":"Nix language support for the CodeMirror code editor","keywords":["editor","code","nix","codemirror"],"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","type":"module","main":"dist/index.cjs","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","module":"dist/index.js","sideEffects":false,"scripts":{"build":"cm-buildhelper src/index.ts","prepare":"npm run build","test":"npm run build && node --test \"test/*.test.ts\"","measure":"npm run build && node test/measure.ts","fuzz":"npm run build && node ../lezer-survey/src/cli.ts fuzz"},"dependencies":{"@codemirror/autocomplete":"^6.0.0","@codemirror/language":"^6.0.0","@lezer/common":"^1.0.0","@lezer/highlight":"^1.0.0","@lezer/lr":"^1.0.0"},"devDependencies":{"@codemirror/buildhelper":"^0.1.16","@codemirror/state":"^6.0.0","@codemirror/view":"^6.0.0","@lezer/generator":"^1.0.0"},"homepage":"https://codincod.com/","repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-nix"},"gitHead":"ede3fbabdfcfdd46ae25fd8169880876932b51cc","_id":"@codincod/codemirror-lang-nix@0.2.0","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-jfJ6AuvOhoSSPnPfq9VLz3cLmQCmDNFaUlwcv82G5TLBdQVmohiaGLKKVAPHBUiKZOTUXGk0/FqnG6rnnqzkqQ==","shasum":"0d4d69442f619c5f6260937a21b50c4c4892d666","tarball":"https://registry.npmjs.org/@codincod/codemirror-lang-nix/-/codemirror-lang-nix-0.2.0.tgz","fileCount":10,"unpackedSize":46222,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAGg9lbOmeDMOvPFnGyHdl6M1t16gWYLjbeZJ3tug3fuAiBWGX3TGPOhJSjnFDKmz7dIRU+7u4dZpOUGCJLDU5EXRg=="}]},"_npmUser":{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"},"directories":{},"maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/codemirror-lang-nix_0.2.0_1786759722305_0.5099571662667104"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T17:59:47.180Z","modified":"2026-08-15T02:08:42.648Z","0.1.0":"2026-07-27T17:59:47.475Z","0.1.1":"2026-07-29T00:59:08.101Z","0.1.2":"2026-08-05T22:55:27.268Z","0.1.3":"2026-08-11T22:52:04.961Z","0.2.0":"2026-08-15T02:08:42.473Z"},"author":{"name":"CodinCod","email":"hello@codincod.com"},"license":"MIT","homepage":"https://codincod.com/","keywords":["editor","code","nix","codemirror"],"repository":{"type":"git","url":"https://codeberg.org/reeven/codemirror-lang-nix"},"description":"Nix language support for the CodeMirror code editor","maintainers":[{"name":"juicemitapfelndrin","email":"juicemitapfelndrin@gmail.com"}],"readme":"# @codincod/codemirror-lang-nix\n\nThis package implements Nix language support for the\n[CodeMirror](https://codemirror.net/) code editor, using the\n[Lezer](https://lezer.codemirror.net/) grammar Replit wrote for\n[@replit/codemirror-lang-nix](https://github.com/replit/codemirror-lang-nix),\nwith the parse fixes below on top of it.\n\nWritten in part for [CodinCod](https://codincod.com/), a competitive coding\nplatform, where it colours the editor people solve puzzles in.\n\nThis code is released under an MIT license.\n\n## Usage\n\n```javascript\nimport { EditorView, basicSetup } from \"codemirror\"\nimport { nix } from \"@codincod/codemirror-lang-nix\"\n\nconst view = new EditorView({\n  parent: document.body,\n  doc: `{ lib, stdenv }:\n\nstdenv.mkDerivation {\n  pname = \"hello\";\n  version = \"2.12.1\";\n\n  meta = with lib; {\n    license = licenses.gpl3Plus;\n  };\n}`,\n  extensions: [basicSetup, nix()],\n})\n```\n\n## What changed\n\nFive parse fixes over the published 6.0.1, each with grammar tests:\n\n* the escapes of an indented string. `''$`, `'''` and `''\\n` each ended the\n  string early, which broke every derivation carrying a shell script;\n* a trailing comma in a formal argument set, which is how nixfmt writes one\n  that spans lines;\n* `true`, `false`, `null`, `builtins` and `or` as attribute and argument\n  names, which Nix allows and the grammar did not;\n* an inherit that names nothing, as in `inherit (x);`;\n* `++` tokenizing as two `+`, which a rebuild with a current\n  @lezer/generator otherwise reintroduces.\n\nThe same five sit on the `upstream` branch, without the comments, for a pull\nrequest to Replit.\n\n## Tests\n\n`npm test` builds the parser and runs the grammar tests in `test/*.txt`.\n\n`npm run corpus <directory>` parses every `.nix` file under a directory and\nreports how many produce no error node. Against nixpkgs 25.05, 31646 files,\nthat is 99.99%. The two it does not read are a file nixpkgs keeps\ndeliberately unparseable as a fixture for its own tests, and one path\ninterpolation.\n\n## Known gaps\n\nA path may interpolate, as in `./${name}/default.nix`. A path is one token\nhere, so that one reads as an error.\n","readmeFilename":"README.md"}