mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
treesitter: update docs on predicates
This commit is contained in:
parent
dc579c420b
commit
e54c6b077c
@ -756,14 +756,15 @@ Here is a list of built-in predicates :
|
|||||||
((node1) @left (node2) @right (#eq? @left @right))
|
((node1) @left (node2) @right (#eq? @left @right))
|
||||||
<
|
<
|
||||||
`match?` *ts-predicate-match?*
|
`match?` *ts-predicate-match?*
|
||||||
This will match if the provived lua regex matches the text
|
`vim-match?` *ts-predicate-vim-match?*
|
||||||
|
This will match if the provived vim regex matches the text
|
||||||
corresponding to a node : >
|
corresponding to a node : >
|
||||||
((idenfitier) @constant (#match? @constant "^[A-Z_]+$"))
|
((idenfitier) @constant (#match? @constant "^[A-Z_]+$"))
|
||||||
< Note: the `^` and `$` anchors will respectively match the
|
< Note: the `^` and `$` anchors will respectively match the
|
||||||
start and end of the node's text.
|
start and end of the node's text.
|
||||||
|
|
||||||
`vim-match?` *ts-predicate-vim-match?*
|
`lua-match?` *ts-predicate-lua-match?*
|
||||||
This will match the same way than |match?| but using vim
|
This will match the same way than |match?| but using lua
|
||||||
regexes.
|
regexes.
|
||||||
|
|
||||||
`contains?` *ts-predicate-contains?*
|
`contains?` *ts-predicate-contains?*
|
||||||
|
Loading…
Reference in New Issue
Block a user