aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-12-08 09:51:46 -0700
committerGitHub <noreply@github.com>2022-12-08 09:51:46 -0700
commit42009ac7df88bfffeea49a83e642fdc6cf9f9447 (patch)
tree8be7e05b19764ce65d78431e93b6247f013bb48f /runtime/doc
parentd44699800cd0dbf14fb45476c13b6cc3c993b5c7 (diff)
downloadrneovim-42009ac7df88bfffeea49a83e642fdc6cf9f9447.tar.gz
rneovim-42009ac7df88bfffeea49a83e642fdc6cf9f9447.tar.bz2
rneovim-42009ac7df88bfffeea49a83e642fdc6cf9f9447.zip
feat(treesitter): add 'lang' option to show_tree() (#21341)
This is necessary for now to support filetypes that use a parser with a different name (e.g. the "terraform" filetype uses the "hcl" parser).
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/treesitter.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 71a5fdaad0..096cec6678 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -526,6 +526,7 @@ get_node_at_pos({bufnr}, {row}, {col}, {opts})
• {row} (number) Position row
• {col} (number) Position column
• {opts} (table) Optional keyword arguments:
+ • lang string|nil Parser language
• ignore_injections boolean Ignore injected languages
(default true)
@@ -612,6 +613,8 @@ show_tree({opts}) *vim.treesitter.show_tree()*
Parameters: ~
• {opts} (table|nil) Optional options table with the following possible
keys:
+ • lang (string|nil): The language of the source buffer. If
+ omitted, the filetype of the source buffer is used.
• bufnr (number|nil): Buffer to draw the tree into. If
omitted, a new buffer is created.
• winid (number|nil): Window id to display the tree buffer in.