diff options
author | Stephan Seitz <stephan.seitz@fau.de> | 2021-04-11 21:05:22 +0200 |
---|---|---|
committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-07-24 20:57:45 +0200 |
commit | 289c153d1f96678eb36af9bfabf90eedb9d8a72f (patch) | |
tree | 5174599e92dd4d219a7b729190714e43257fa390 | |
parent | b2a9afef6deaceb5d29440c486818ce8268c1873 (diff) | |
download | rneovim-289c153d1f96678eb36af9bfabf90eedb9d8a72f.tar.gz rneovim-289c153d1f96678eb36af9bfabf90eedb9d8a72f.tar.bz2 rneovim-289c153d1f96678eb36af9bfabf90eedb9d8a72f.zip |
doc: group documentation of predicates and directives
-rw-r--r-- | runtime/doc/treesitter.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index ce2b287944..cabcb67921 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -226,6 +226,18 @@ Here is a list of built-in predicates : Each predicate has a `not-` prefixed predicate that is just the negation of the predicate. + *vim.treesitter.query.add_predicate()* +vim.treesitter.query.add_predicate({name}, {handler}) + +This adds a predicate with the name {name} to be used in queries. +{handler} should be a function whose signature will be : > + handler(match, pattern, bufnr, predicate) +< + *vim.treesitter.query.list_predicates()* +vim.treesitter.query.list_predicates() + +This lists the currently available predicates to use in queries. + Treesitter Query Directive *lua-treesitter-directives* Treesitter queries can also contain `directives`. Directives store metadata for a node @@ -249,18 +261,6 @@ Here is a list of built-in directives: `({capture_id}, {start_row}, {start_col}, {end_row}, {end_col}, {key?})` The default key is "offset". - *vim.treesitter.query.add_predicate()* -vim.treesitter.query.add_predicate({name}, {handler}) - -This adds a predicate with the name {name} to be used in queries. -{handler} should be a function whose signature will be : > - handler(match, pattern, bufnr, predicate) -< - *vim.treesitter.query.list_predicates()* -vim.treesitter.query.list_predicates() - -This lists the currently available predicates to use in queries. - *vim.treesitter.query.add_directive()* vim.treesitter.query.add_directive({name}, {handler}) |