Skip to content

Bump tree-sitter-go to v0.25.0#48870

Merged
MrSubidubi merged 1 commit intozed-industries:mainfrom
MohibShaikh:bump-tree-sitter-go-0.25
Feb 10, 2026
Merged

Bump tree-sitter-go to v0.25.0#48870
MrSubidubi merged 1 commit intozed-industries:mainfrom
MohibShaikh:bump-tree-sitter-go-0.25

Conversation

@MohibShaikh
Copy link
Contributor

@MohibShaikh MohibShaikh commented Feb 10, 2026

Fixes #48357

Summary

  • Bumps tree-sitter-go from 0.23 to 0.25
  • This fixes wrong syntax highlighting with chained indexing in Go (e.g. a[b][c] = 0 being incorrectly parsed as a type instantiation expression instead of an index expression)
  • The upstream fix (tree-sitter/tree-sitter-go#160) landed in v0.25.0, which gives index expressions a higher dynamic precedence over type instantiation expressions
  • Updated runnables.scm to account for the new statement_list node that wraps statements inside blocks in tree-sitter-go 0.25

Test plan

  • cargo test -p languages — all 47 tests pass
  • Verified that existing Go runnables queries (table tests, subtests, test detection) work with the updated grammar

Release Notes:

  • Fixed wrong syntax highlighting with chained indexing in Go (e.g. a[b][c]) by bumping tree-sitter-go to 0.25

This fixes wrong syntax highlighting with chained indexing in Go
(e.g. `a[b][c] = 0` being parsed as a type instantiation expression
instead of an index expression).

The upstream fix (tree-sitter/tree-sitter-go#160) landed in v0.25.0
which gives index expressions a dynamic precedence of 1 over type
instantiation expressions.

Updated runnables.scm to account for the new `statement_list` node
that wraps statements inside blocks in tree-sitter-go 0.25.

Closes zed-industries#48357
@cla-bot
Copy link

cla-bot bot commented Feb 10, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @MohibShaikh on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Feb 10, 2026
@MohibShaikh
Copy link
Contributor Author

@cla-bot check

@cla-bot
Copy link

cla-bot bot commented Feb 10, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @MohibShaikh on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@cla-bot
Copy link

cla-bot bot commented Feb 10, 2026

The cla-bot has been summoned, and re-checked this pull request!

@MohibShaikh
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 10, 2026
@cla-bot
Copy link

cla-bot bot commented Feb 10, 2026

The cla-bot has been summoned, and re-checked this pull request!

@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Feb 10, 2026

Messages
📖

This PR includes links to the following GitHub Issues: #tree-sitter/tree-sitter-go#160
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against 77800cc

@MrSubidubi MrSubidubi changed the title Bump tree-sitter-go from 0.23 to 0.25 Bump tree-sitter-go to v0.25.0 Feb 10, 2026
Copy link
Member

@MrSubidubi MrSubidubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you! And congratulations to your first contribution! 🎉

@MrSubidubi MrSubidubi self-assigned this Feb 10, 2026
@MrSubidubi MrSubidubi merged commit 8b5328c into zed-industries:main Feb 10, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong syntax highlighting with chained indexing in Go

3 participants