{"_id":"@boundaryml/baml-grammar","name":"@boundaryml/baml-grammar","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@boundaryml/baml-grammar","version":"0.1.0","type":"module","description":"TextMate grammar for the BAML language, with a ready-to-use Shiki LanguageRegistration export.","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/BoundaryML/textMate-baml.git"},"homepage":"https://www.boundaryml.com","bugs":{"url":"https://github.com/BoundaryML/baml/issues"},"keywords":["baml","textmate","tmlanguage","shiki","syntax-highlighting","grammar"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./baml.tmLanguage.json":"./grammars/baml.tmLanguage.json","./language-configuration.json":"./language-configuration.json","./package.json":"./package.json"},"dependencies":{"@shikijs/types":"^3.0.0"},"_id":"@boundaryml/baml-grammar@0.1.0","gitHead":"fd237f63ae40aac54e38c45a68cd973addcd0e46","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-svEerK4E371R8P0heyNo9mh2t8PylvWF1GjYtiOZO4cRcfyGrIKExiKevv628g+DUWYobHHzWFQ15Kt8J2xdug==","shasum":"82b000980fdf6edcce81662906d0d412930d36a8","tarball":"https://registry.npmjs.org/@boundaryml/baml-grammar/-/baml-grammar-0.1.0.tgz","fileCount":7,"unpackedSize":242815,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCNnrez6kFu4FIHvz1GywjVqGf2/zL0tDs8pyTDI4s9PwIhAPEp1YUZeJVRf9+Z5ApBDAEEEZekq/bmCuX7aLTAKJQ6"}]},"_npmUser":{"name":"hellovai-boundary","email":"vbv@boundaryml.com"},"directories":{},"maintainers":[{"name":"aaronvg","email":"aaron@gloo.chat"},{"name":"hellovai-boundary","email":"vbv@boundaryml.com"},{"name":"sxlijin","email":"npmjs@sxlijin.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/baml-grammar_0.1.0_1783890774619_0.21104405885342747"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-12T21:12:54.453Z","0.1.0":"2026-07-12T21:12:54.759Z","modified":"2026-07-12T21:12:55.041Z"},"maintainers":[{"name":"aaronvg","email":"aaron@gloo.chat"},{"name":"hellovai-boundary","email":"vbv@boundaryml.com"},{"name":"sxlijin","email":"npmjs@sxlijin.com"}],"description":"TextMate grammar for the BAML language, with a ready-to-use Shiki LanguageRegistration export.","homepage":"https://www.boundaryml.com","keywords":["baml","textmate","tmlanguage","shiki","syntax-highlighting","grammar"],"repository":{"type":"git","url":"git+https://github.com/BoundaryML/textMate-baml.git"},"bugs":{"url":"https://github.com/BoundaryML/baml/issues"},"license":"Apache-2.0","readme":"# BAML TextMate grammar\n\nThe TextMate grammar for [BAML](https://github.com/BoundaryML/baml) (`scopeName: source.baml`), published as [`@boundaryml/baml-grammar`](https://www.npmjs.com/package/@boundaryml/baml-grammar).\n\nThis repository is a read-only mirror, generated from [`typescript2/pkg-grammar`](https://github.com/BoundaryML/baml/tree/canary/typescript2/pkg-grammar) in the BAML monorepo. Do not edit it by hand; changes land here automatically when the grammar changes upstream. It is also the source [GitHub Linguist](https://github.com/github-linguist/linguist) vendors for `.baml` highlighting on github.com.\n\n## Install\n\n```sh\nnpm install @boundaryml/baml-grammar\n```\n\n## Shiki\n\nThe default export is a ready-to-use `LanguageRegistration`:\n\n```ts\nimport { createHighlighter } from \"shiki\";\nimport baml from \"@boundaryml/baml-grammar\";\n\nconst highlighter = await createHighlighter({\n  themes: [\"github-dark\"],\n  langs: [baml],\n});\n\nhighlighter.codeToHtml(code, { lang: \"baml\", theme: \"github-dark\" });\n```\n\nThe grammar is self-contained (it embeds no other language scopes), so no additional grammars need to be loaded.\n\n## VS Code / vscode-textmate / Monaco (monaco-textmate)\n\nUse the raw grammar JSON, plus the editor configuration (brackets, comments, auto-closing pairs):\n\n```ts\nimport grammar from \"@boundaryml/baml-grammar/baml.tmLanguage.json\" with { type: \"json\" };\nimport languageConfiguration from \"@boundaryml/baml-grammar/language-configuration.json\" with { type: \"json\" };\n```\n\nIf your bundler cannot handle JSON import attributes (Metro/React Native, some Vite configs), use the default export instead: it is the same grammar inlined in a plain JS module.\n\n```ts\nimport grammar from \"@boundaryml/baml-grammar\";\n```\n\n## Files\n\n| Path | Contents |\n| --- | --- |\n| `dist/index.js` | ESM module, default-exports the grammar (Shiki `LanguageRegistration`) |\n| `grammars/baml.tmLanguage.json` | Raw TextMate grammar |\n| `language-configuration.json` | VS Code style language configuration |\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","_rev":"1-d9cd268c4d495325c84bd6615817c9ac"}