aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-11-23 10:44:45 +0100
committerGitHub <noreply@github.com>2020-11-23 10:44:45 +0100
commit43ec616414c7f17585e8b4a7e34acaaedfff5121 (patch)
treef74318cb686ccdd5467cd3860280c01eca6cfcf9 /runtime/doc
parentcd691f2b6f605bc7fc13961e275823673d9871ad (diff)
parent1a631026a942b3311adec0bee6d9b0b932c5de31 (diff)
downloadrneovim-43ec616414c7f17585e8b4a7e34acaaedfff5121.tar.gz
rneovim-43ec616414c7f17585e8b4a7e34acaaedfff5121.tar.bz2
rneovim-43ec616414c7f17585e8b4a7e34acaaedfff5121.zip
Merge pull request #13252 from nvim-treesitter/language-tree
Language tree
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/treesitter.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 58cd535e98..b6a238f158 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -59,15 +59,16 @@ shouldn't be done directly in the change callback anyway as they will be very
frequent. Rather a plugin that does any kind of analysis on a tree should use
a timer to throttle too frequent updates.
-tsparser:set_included_ranges({ranges}) *tsparser:set_included_ranges()*
- Changes the ranges the parser should consider. This is used for
- language injection. {ranges} should be of the form (all zero-based): >
+tsparser:set_included_regions({region_list}) *tsparser:set_included_regions()*
+ Changes the regions the parser should consider. This is used for
+ language injection. {region_list} should be of the form (all zero-based): >
{
- {start_node, end_node},
+ {node1, node2},
...
}
<
- NOTE: `start_node` and `end_node` are both inclusive.
+ `node1` and `node2` are both considered part of the same region and
+ will be parsed together with the parser in the same context.
Tree methods *lua-treesitter-tree*
@@ -253,7 +254,7 @@ Here is a list of built-in predicates :
`lua-match?` *ts-predicate-lua-match?*
This will match the same way than |match?| but using lua
regexes.
-
+
`contains?` *ts-predicate-contains?*
Will check if any of the following arguments appears in the
text corresponding to the node : >