typescript2/pkg-grammar/README.md
Canonical TextMate grammars for the BAML language — the single source of truth for syntax highlighting.
baml.tmLanguage.json — the BAML grammar (source.baml)jinja.tmLanguage.json — the Jinja sub-grammar embedded in prompt blocks
(source.baml-jinja)Edit the JSON files in this package only. Then propagate to consumers:
pnpm --filter @b/pkg-grammar sync
import('@b/pkg-grammar/baml.tmLanguage.json')) — no local copy.syntaxes/ because VS Code
loads the grammar from the physical file named in contributes.grammars[].path
and the extension ships bundled (no node_modules in the .vsix). The mirror
is regenerated by sync (run automatically on its dev/build) and a
pre-commit hook (pnpm --filter @b/pkg-grammar check) fails if it drifts.