Open XiNiHa opened 2 weeks ago
@XiNiHa
I just opened a discussion on a similar topic... IMO the way that exensions handle tree sitter queries seems messy and counter to Tree Sitter's implicit recommendation that grammar and queries are defined together in a single project.
Check for existing issues
Describe the feature
Currently, extensions can't extend language queries of existing languages. Since things like providing custom injections and highlights are only possible by writing language queries, this limits extensions to implement some critical features, like providing an embedded language injection pattern, resulting in manually adding them one by one to the upstream. While it looks like overriding them is possible, that is not scalable and is likely to clash if multiple extensions try to override the same language. A stabilized interface to merge additions from extensions would be very helpful here.
Continued from #5184
If applicable, add mockups / screenshots to help present your vision of the feature
No response