aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-10-30 10:51:41 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-11-01 14:59:17 +0100
commit03c478ae53c71d0693f1d72b0da9706569cb8fba (patch)
treea0523d53364e40dc6013acee11600ca06b526703 /runtime/doc
parent037ffd54dcd8edba6787d93273e6696b7a366ac6 (diff)
downloadrneovim-03c478ae53c71d0693f1d72b0da9706569cb8fba.tar.gz
rneovim-03c478ae53c71d0693f1d72b0da9706569cb8fba.tar.bz2
rneovim-03c478ae53c71d0693f1d72b0da9706569cb8fba.zip
treesitter: add node:id()
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/treesitter.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 7f644486f7..aaf13d1640 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -136,6 +136,15 @@ tsnode:has_error() *tsnode:has_error()*
tsnode:sexpr() *tsnode:sexpr()*
Get an S-expression representing the node as a string.
+tsnode:id() *tsnode:id()*
+ Get an unique identier for the node inside its own tree.
+
+ No guarantees are made about this identifer's internal representation,
+ except for being a primitive lua type with value equality (so not a table).
+ Presently it is a (non-printable) string.
+
+ NB: the id is not guaranteed to be unique for nodes from different trees.
+
tsnode:descendant_for_range({start_row}, {start_col}, {end_row}, {end_col})
*tsnode:descendant_for_range()*
Get the smallest node within this node that spans the given range of