Closed chookity-pokk closed 1 year ago
Capture groups are free-form. You can pick any name.
Sorry for the delayed response. So if one wanted to read up on the best way to build a complex query, where would one do that? The official treesitter documentation or the elisp treesitter documentation?
Both. Ultimately everything you need to know is documented in the TS documentation, but the elisp one does add more Emacs-specific things you should know.
First off, love the tool and the awesome book!
When using the tool though my main interest is using it for querying and I am having trouble finding documentation for how to build a query. I tried using the Emacs Treesitter documentation and those queries don't seem to work a good chunk of the time and the official Treesitter documentation has the same issue. My super basic example is just looking for comments which the Treesitter documentation shows should be
(comment)+
here but when I try this in combobulate I getno matches or no @capture groups
.So where can one find a list of capture groups and documentation for the query syntax?