Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: --abi 14 and review comments in nvim-treesitter #52

Merged
merged 5 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
env:
TREE_SITTER_ABI_VERSION: 14
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/setup-action/cli@v2
with:
tree-sitter-ref: "v0.25.3"
- uses: tree-sitter/parser-test-action@v2

- name: Check the ABI version
if: ${{ runner.os != 'Windows' }}
run: |
have_it=$(grep "^#define LANGUAGE_VERSION $TREE_SITTER_ABI_VERSION\s*$" src/parser.c -c)
test "$have_it" -eq 1

- name: Run all Tree-sitter tests
uses: tree-sitter/parser-test-action@v2
with:
generate: true
test-parser: true
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ queries/

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.

## Contributing

This section will be a separate file as per https://github.com/tact-lang/tree-sitter-tact/issues/35.

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.

## ⚙ References

- [grammar.gg](https://github.com/tact-lang/tact/blob/da4b8d82128cf4b6f9b04d93a93a9382407112c2/src/grammar/next/grammar.gg) — Official Tact grammar specification.
Expand Down
2 changes: 1 addition & 1 deletion editor_queries/neovim/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
(identifier) @variable

(destruct_bind
name: (identifier) @comment
name: (identifier) @variable.member
bind: (identifier) @variable)

; variable.builtin
Expand Down
12 changes: 12 additions & 0 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 3 additions & 40 deletions src/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading