Skip to content

Add tree-sitter.json.#64

Merged
vantreeseba merged 1 commit intovantreeseba:mainfrom
EugeneNeuron:main
Apr 22, 2026
Merged

Add tree-sitter.json.#64
vantreeseba merged 1 commit intovantreeseba:mainfrom
EugeneNeuron:main

Conversation

@EugeneNeuron
Copy link
Copy Markdown
Contributor

This file is expected by tree-sitter CLI.
It allows to infer file types, injection-regex, etc. during tree-sitter test [1].

[1] https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting#query-paths

@vantreeseba
Copy link
Copy Markdown
Owner

I'm not sure if including this in this repo itself is the intended use case.
This seems to a be a file typically used by an IDE/cli itself to define the configuration for using tree-sitter.

I know neovim treesitter puts it's own version of this somewhere and requires you to copy the query/etc files over.

That being said I don't know if there is actually an issue with including this, so I may pull it in soon, but thank you for the contribution.

@EugeneNeuron
Copy link
Copy Markdown
Contributor Author

I don't know how IDEs or neovim treat this file. Maybe neovim puts it's own version of this because the repo itself doesn't provide it, I don't know.

I just know that:

  1. it's needed for tree-sitter CLI to run highlight tests.
  2. it's created by tree-sitter init.
  3. it's present in all upstream official grammars (and other well-maintained as well), e.g. python, javascript.
  4. it's expected by the tree-sitter: "Language configuration in grammar repositories' tree-sitter.json files" (from link above).

@vantreeseba
Copy link
Copy Markdown
Owner

I'll look into this again soon and figure out what to do with this PR, thanks.

@vantreeseba vantreeseba merged commit f2a2394 into vantreeseba:main Apr 22, 2026
1 check passed
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