nvim_runtime_lua

vim.treesitter.QueryInfo

Information for Query, see |vim.treesitter.query.parse()|

Fields2

QueryInfo.captures : string[]

List of (unique) capture names defined in query.

QueryInfo.patterns : {integer, string | integer[][]}

Contains information about predicates and directives. Key is pattern id, and value is list of predicates or directives defined in the pattern. A predicate or directive is a list of (integer|string); integer represents capture_id, and string represents (literal) arguments to predicate/directive. See |treesitter-predicates| and |treesitter-directives| for more details.