feat(treesitter): allow disabling captures and patterns on TSQuery (#32790)

Problem: Cannot disable individual captures and patterns in treesitter queries.

Solution: 
* Expose the corresponding tree-sitter API functions for `TSQuery` object. 
* Add documentation for `TSQuery`.
* Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
This commit is contained in:
Ian Chamberlain
2025-03-11 09:45:01 -04:00
committed by GitHub
parent 0829e7575d
commit 8b5a0a00c8
10 changed files with 212 additions and 15 deletions

View File

@@ -328,10 +328,12 @@ local config = {
'treesitter.lua',
'language.lua',
'query.lua',
'tsquery.lua',
'highlighter.lua',
'languagetree.lua',
'dev.lua',
},
append_only = { 'tsquery.lua' },
files = {
'runtime/lua/vim/treesitter/_meta/',
'runtime/lua/vim/treesitter.lua',