Skip to content

Conversation

@clason
Copy link
Collaborator

@clason clason commented Dec 26, 2025

  • feat: update bindings
  • feat: update parser with 0.26
  • ci: add dependabot for GH actions
  • ci: add query validation job
  • feat(queries): sync with nvim-treesitter

@clason clason force-pushed the ci/update branch 4 times, most recently from 5f7a926 to fdcad31 Compare December 26, 2025 16:58
@clason
Copy link
Collaborator Author

clason commented Dec 26, 2025

@MunifTanjim I have synced the queries with nvim-treesitter's since they are more extensive (so give better coverage), but especially the injection queries may be too specific. Let me know if you want me to drop these to "Lua only".

@clason clason force-pushed the ci/update branch 2 times, most recently from 341ed24 to 45b1ce4 Compare December 26, 2025 17:02
Copy link
Collaborator

Choose a reason for hiding this comment

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

About the vim specific injections, it depends on what the goals of tree-sitter-grammars org are. If we add these vim specific ones here, would we also be adding these for other projects?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My stance is the following: Queries are editor- (or more generally, downstream tool-)specific, as they are the "glue" between tree-sitter and the tool functionality. As such, "grammar queries" cannot be meant to be directly used -- they are meant to be "reference queries" for

  1. illustrating how to use the grammar,
  2. adapting to downstream convention,
  3. catching breaking grammar changes so they can be flagged as such (and downstream users can look at the reference query changes to easily see how to adapt their own).

In this regard, the nvim-treesitter queries are not "blessed" or superior for tree-sitter-grammars projects; they're just a handy set of existing queries that are (especially for me) easy to steal. I certainly don't mean to keep them in sync.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In particular, the specific capture names are completely irrelevant here; they are just an ignored byproduct of simply copying the queries rather than manually formatting them and then adding individual patterns.

Again, if you don't think they add value here, I'm fine just dropping them and running ts_query_ls format on the existing ones instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In fact, let me do that first so we can separate the formatting from the additions.

@clason clason requested a review from MunifTanjim December 26, 2025 19:02
@clason clason merged commit 03516cb into main Dec 26, 2025
5 checks passed
@clason clason deleted the ci/update branch December 26, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants