Skip to content

Commit a19be2d

Browse files
authored
fix: --abi 14 and review comments in nvim-treesitter (#52)
1 parent 19fecce commit a19be2d

File tree

5 files changed

+33
-42
lines changed

5 files changed

+33
-42
lines changed

.github/workflows/ci.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,22 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
os: [ubuntu-latest, windows-latest, macos-14]
25+
env:
26+
TREE_SITTER_ABI_VERSION: 14
2527
steps:
2628
- uses: actions/checkout@v4
2729
- uses: tree-sitter/setup-action/cli@v2
2830
with:
2931
tree-sitter-ref: "v0.25.3"
30-
- uses: tree-sitter/parser-test-action@v2
32+
33+
- name: Check the ABI version
34+
if: ${{ runner.os != 'Windows' }}
35+
run: |
36+
have_it=$(grep "^#define LANGUAGE_VERSION $TREE_SITTER_ABI_VERSION\s*$" src/parser.c -c)
37+
test "$have_it" -eq 1
38+
39+
- name: Run all Tree-sitter tests
40+
uses: tree-sitter/parser-test-action@v2
3141
with:
3242
generate: true
3343
test-parser: true

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,12 @@ queries/
201201

202202
To find highlighting and other queries for specific editors, look in the `editor_queries/` directory. There, all the queries target development upstream branches of the relevant editors, unless the directory has a suffix `-release/`, in such case the queries provided there are targeting the latest releases.
203203

204+
## Contributing
205+
206+
This section will be a separate file as per https://github.com/tact-lang/tree-sitter-tact/issues/35.
207+
208+
For now, I just wanted to leave a note to use ABI version 14: `npm run ts -- generate --abi=14`, or by setting `export TREE_SITTER_ABI_VERSION=14` prior to generation command. This is important for Helix, Neovim, and other editors and tools which still use lower versions.
209+
204210
## ⚙ References
205211

206212
- [grammar.gg](https://github.com/tact-lang/tact/blob/da4b8d82128cf4b6f9b04d93a93a9382407112c2/src/grammar/next/grammar.gg) — Official Tact grammar specification.

editor_queries/neovim/highlights.scm

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(identifier) @variable
77

88
(destruct_bind
9-
name: (identifier) @comment
9+
name: (identifier) @variable.member
1010
bind: (identifier) @variable)
1111

1212
; variable.builtin

package.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.c

+3-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)