aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/query.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-12-02 16:45:39 +0100
committerGitHub <noreply@github.com>2022-12-02 16:45:39 +0100
commit07e6296520fc83b1fdb287b5173494cdd0e9136f (patch)
tree9844003e550f161a5d563a726fc759fa1a84d22a /runtime/lua/vim/treesitter/query.lua
parent731432342058c1c4340fc3cc4782b5fcd4a756a0 (diff)
parente40df8b1bc6a7832c7707696b374b19642dfd596 (diff)
downloadrneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.gz
rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.bz2
rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.zip
Merge pull request #21154 from clason/vimdoc-injections
feat(help): highlighted codeblocks
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r--runtime/lua/vim/treesitter/query.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua
index 7ca7384a88..4bec5db527 100644
--- a/runtime/lua/vim/treesitter/query.lua
+++ b/runtime/lua/vim/treesitter/query.lua
@@ -549,7 +549,7 @@ end
--- The iterator returns three values: a numeric id identifying the capture,
--- the captured node, and metadata from any directives processing the match.
--- The following example shows how to get captures by name:
---- <pre>
+--- <pre>lua
--- for id, node, metadata in query:iter_captures(tree:root(), bufnr, first, last) do
--- local name = query.captures[id] -- name of the capture in the query
--- -- typically useful info about the node:
@@ -603,7 +603,7 @@ end
--- If the query has more than one pattern, the capture table might be sparse
--- and e.g. `pairs()` method should be used over `ipairs`.
--- Here is an example iterating over all captures in every match:
---- <pre>
+--- <pre>lua
--- for pattern, match, metadata in cquery:iter_matches(tree:root(), bufnr, first, last) do
--- for id, node in pairs(match) do
--- local name = query.captures[id]