Skip to content

Copy Missing tree-sitter Queries From nvim-treesitter (with attribution) #87

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

Merged
merged 3 commits into from
Jun 11, 2025

Conversation

thecoolwinter
Copy link
Contributor

Description

This PR introduces a new build step, where missing tree-sitter query files are copied from nvim-treesitter. Neovim has done an amazing job curating good tree-sitter language support through queries. They use the same parsers we do, but have implemented a few more queries on top of the ones implemented in the parent language repositories.

I don't want to look like we're just stealing the work neovim has done. Neovim is under the Apache 2.0 license, and each query file used from their project is copied with a copyright notice directing contributors to their repository. Hopefully the sharing of query files means issues found in CodeEdit will be fixed for Neovim as well.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

@thecoolwinter thecoolwinter changed the title Pull Missing Query Files Copy missing tree-sitter queries from nvim-treesitter with attribution Jun 6, 2025
@thecoolwinter thecoolwinter changed the title Copy missing tree-sitter queries from nvim-treesitter with attribution Copy Missing tree-sitter Queries From nvim-treesitter (with attribution) Jun 6, 2025
@thecoolwinter
Copy link
Contributor Author

This is open to review for comment on the method used, I still need to update language definitions to include the new query files at runtime.

@thecoolwinter
Copy link
Contributor Author

While I'm doing the changes I'm also adding a test to warn if we're bundling query files that aren't referenced, and fail CI if we're referencing files that don't exist.

Screenshot 2025-06-06 at 10 29 03 AM

@thecoolwinter
Copy link
Contributor Author

Okay, this is entirely ready to merge now.

@thecoolwinter thecoolwinter merged commit 9c50300 into CodeEditApp:main Jun 11, 2025
2 checks 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.

3 participants