mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
docs(treesitter): don't quote metadata
(cherry picked from commit 5aa1a9532c
)
This commit is contained in:
@@ -332,7 +332,7 @@ TREESITTER QUERY DIRECTIVES *treesitter-directives*
|
|||||||
Treesitter directives store metadata for a node or match and perform side
|
Treesitter directives store metadata for a node or match and perform side
|
||||||
effects. For example, the `set!` directive sets metadata on the match or node: >query
|
effects. For example, the `set!` directive sets metadata on the match or node: >query
|
||||||
|
|
||||||
((identifier) @foo (#set! "type" "parameter"))
|
((identifier) @foo (#set! type "parameter"))
|
||||||
<
|
<
|
||||||
The following directives are built in:
|
The following directives are built in:
|
||||||
|
|
||||||
@@ -347,9 +347,9 @@ The following directives are built in:
|
|||||||
{value}
|
{value}
|
||||||
|
|
||||||
Examples: >query
|
Examples: >query
|
||||||
((identifier) @foo (#set! @foo "kind" "parameter"))
|
((identifier) @foo (#set! @foo kind "parameter"))
|
||||||
((node1) @left (node2) @right (#set! "type" "pair"))
|
((node1) @left (node2) @right (#set! type "pair"))
|
||||||
((codeblock) @markup.raw.block (#set! "priority" 90))
|
((codeblock) @markup.raw.block (#set! priority 90))
|
||||||
<
|
<
|
||||||
`offset!` *treesitter-directive-offset!*
|
`offset!` *treesitter-directive-offset!*
|
||||||
Takes the range of the captured node and applies an offset. This will
|
Takes the range of the captured node and applies an offset. This will
|
||||||
@@ -633,7 +633,7 @@ higher than treesitter. It is also possible to change the priority of an
|
|||||||
individual query pattern manually by setting its `"priority"` metadata
|
individual query pattern manually by setting its `"priority"` metadata
|
||||||
attribute: >query
|
attribute: >query
|
||||||
|
|
||||||
((super_important_node) @superimportant (#set! "priority" 105))
|
((super_important_node) @superimportant (#set! priority 105))
|
||||||
<
|
<
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
Reference in New Issue
Block a user