ParseTreeCapture
A ParseTreeCapture
object describes a parse tree node captured as part of a match found during evaluation of a Tree-sitter query.
Such objects are currently only provided as part of the Completions API when evaluating a language’s highlights query before completion items are requested from providers.
Added in Nova 12.
Properties
metadata
An object mapping strings to strings, describing any metadata collected as part of query evaluation using the #set...!
family of directives. When metadata is set on a capture using a variable name, it will be reflected in this object using that variable name as the key. If no value is specified when setting the value in the query, the value will be an empty string.
This property is readonly.
range
A Range object reflecting the range of text in the document over which the captured node spans.
This property is readonly.
text
A string reflecting the text within the document over which the captured node spans.
This property is readonly.