diff --git a/README.md b/README.md index a97e866..7384931 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,19 @@ # tree-sitter-gram -A [tree-sitter](https://tree-sitter.github.io/) grammar for [Gram](https://gram-lang.org), the declarative recipe DSL. +A [tree-sitter](https://tree-sitter.github.io/) grammar for [Gram](https://gram-lang.org), the open-source recipe DSL. -It is a surface grammar, written for highlighting, folding and outlines in editors. The reference grammar is `packages/parser/grammar.ohm` in the [Gram monorepo](https://git.gram-lang.org/gram-lang/gram): this one reads the same text the same way, including its tolerance. What is not an element is prose, never an error. +[Website](https://gram-lang.org) · [Documentation](https://gram-lang.org/docs/) · [Editors guide](https://gram-lang.org/docs/reference/tooling/editors/) + +> [!NOTE] +> Primary development happens on [Forgejo](https://git.gram-lang.org/gram-lang/tree-sitter-gram), with read-only automatic mirrors on [GitHub](https://github.com/gram-lang/tree-sitter-gram) and [Codeberg](https://codeberg.org/gram-lang/tree-sitter-gram). Issues and pull requests are handled on Forgejo. + +This is a surface grammar written for highlighting, folding, and outlines in editors. The reference grammar is `packages/parser/grammar.ohm` in the [Gram monorepo](https://git.gram-lang.org/gram-lang/gram): this grammar reads the same text the same way, including its tolerance. What is not an element is prose, never an error. + +`v0.1.x` reads Gram 1.5–1.6 syntax. + +## Editor support + +Queries are shipped for **Neovim**, **Helix**, and **Zed** (via [`zed-gram`](https://git.gram-lang.org/gram-lang/zed-gram)). See the [editors guide](https://gram-lang.org/docs/reference/tooling/editors/) for setup instructions in each editor. ## How it reads Gram @@ -27,7 +38,7 @@ The cutting oracle compares, recipe by recipe, the ranges of the elements read b ## Queries -The files under `queries/` are generated by `scripts/gen-queries.mjs` from one table: each pattern has a role, and each role a capture name in Neovim, Helix and Zed, which name the same color differently (a section title is `@markup.heading` in Neovim, `markup.heading` in Helix, `@title` in Zed). The roles follow the scopes of the TextMate grammar (`packages/parser/syntaxes/gram.tmLanguage.json` in the monorepo), so a recipe has the same colors as in VS Code and Sublime. The script only accepts the capture names each editor documents. +The files under `queries/` are generated by `scripts/gen-queries.mjs` from one table: each pattern has a role, and each role a capture name in Neovim, Helix, and Zed, which name the same color differently (a section title is `@markup.heading` in Neovim, `markup.heading` in Helix, `@title` in Zed). The roles follow the scopes of the TextMate grammar (`packages/parser/syntaxes/gram.tmLanguage.json` in the monorepo), so a recipe has the same colors as in VS Code and Sublime. The script only accepts the capture names each editor documents. | File | For | | --- | --- | diff --git a/package-lock.json b/package-lock.json index 7a85535..267664d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,14 @@ "version": "0.1.1", "license": "MIT", "devDependencies": { - "@gram-lang/parser": "file:vendor/gram-lang-parser-c8d120a2.tgz", + "@gram-lang/parser": "1.6.0", "tree-sitter-cli": "0.26.11" } }, "node_modules/@gram-lang/parser": { - "version": "1.5.2", - "resolved": "file:vendor/gram-lang-parser-c8d120a2.tgz", - "integrity": "sha512-xmDG0HhN33LCauEUliS/QK6bgiBZSBh7EVvP+MIL+X2ugTUvHtkg8FXsT7kAdl8YZDBY0KMPwKWHyLPDD+XbNw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@gram-lang/parser/-/parser-1.6.0.tgz", + "integrity": "sha512-AqTHiSXCHnGbgrM8Itxu/fPxvf0GqnFdZssWJ30Toe0wxai8e8D15/F+PqoGqFjkDLA7VQNUKrJbUvG4roTX7g==", "dev": true, "license": "GPL-3.0-or-later", "dependencies": { diff --git a/package.json b/package.json index c30d27c..5647dcf 100644 --- a/package.json +++ b/package.json @@ -26,13 +26,12 @@ "parser:check": "node scripts/check-parser-pin.mjs" }, "devDependencies": { - "@gram-lang/parser": "file:vendor/gram-lang-parser-c8d120a2.tgz", + "@gram-lang/parser": "1.6.0", "tree-sitter-cli": "0.26.11" }, "gram": { "repository": "https://git.gram-lang.org/gram-lang/gram.git", - "ref": "c8d120a22aeef6ec38631037ebd44eb996361c6a", - "parserRelease": "1.6.0", + "ref": "ee04ef942b8113d0750462dd66375c28dd513e0f", "syntaxErrorCases": [ "err-001", "err-009", diff --git a/vendor/gram-lang-parser-c8d120a2.tgz b/vendor/gram-lang-parser-c8d120a2.tgz deleted file mode 100644 index 0c9ab09..0000000 Binary files a/vendor/gram-lang-parser-c8d120a2.tgz and /dev/null differ