aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-11-01 17:27:38 +0100
committerGitHub <noreply@github.com>2020-11-01 17:27:38 +0100
commit8821587748058ee1ad8523865b30a03582f8d7be (patch)
treed7ad8fcf5e12b3733703c1317bd7249c40435730 /runtime/doc
parent106a6c9548aa1d90b2761c0b059348f614a27855 (diff)
parent03c478ae53c71d0693f1d72b0da9706569cb8fba (diff)
downloadrneovim-8821587748058ee1ad8523865b30a03582f8d7be.tar.gz
rneovim-8821587748058ee1ad8523865b30a03582f8d7be.tar.bz2
rneovim-8821587748058ee1ad8523865b30a03582f8d7be.zip
Merge pull request #13192 from bfredl/nodeid
] 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