aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter.lua
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2024-03-02 14:29:41 +0000
committerChristian Clason <c.clason@uni-graz.at>2024-03-06 14:21:46 +0100
commit3c572a31a3bb7009b4ad8eac56da1458acae3b75 (patch)
tree956cd001ccc0fd11dd74712f5d5d07580df972e8 /runtime/lua/vim/treesitter.lua
parent3e016fa8d4f797345d55f6006c42026abedb6c4e (diff)
downloadrneovim-3c572a31a3bb7009b4ad8eac56da1458acae3b75.tar.gz
rneovim-3c572a31a3bb7009b4ad8eac56da1458acae3b75.tar.bz2
rneovim-3c572a31a3bb7009b4ad8eac56da1458acae3b75.zip
docs(treesitter): fix ambiguous parameter description about `lang`
Diffstat (limited to 'runtime/lua/vim/treesitter.lua')
-rw-r--r--runtime/lua/vim/treesitter.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua
index 61c5d66958..7cfebd2c00 100644
--- a/runtime/lua/vim/treesitter.lua
+++ b/runtime/lua/vim/treesitter.lua
@@ -77,7 +77,7 @@ end
--- If needed, this will create the parser.
---
---@param bufnr (integer|nil) Buffer the parser should be tied to (default: current buffer)
----@param lang (string|nil) Filetype of this parser (default: buffer filetype)
+---@param lang (string|nil) Language of this parser (default: from buffer filetype)
---@param opts (table|nil) Options to pass to the created language tree
---
---@return vim.treesitter.LanguageTree object to use for parsing
@@ -452,7 +452,7 @@ end
--- ```
---
---@param bufnr (integer|nil) Buffer to be highlighted (default: current buffer)
----@param lang (string|nil) Language of the parser (default: buffer filetype)
+---@param lang (string|nil) Language of the parser (default: from buffer filetype)
function M.start(bufnr, lang)
bufnr = bufnr or api.nvim_get_current_buf()
local parser = M.get_parser(bufnr, lang)
@@ -480,8 +480,8 @@ end
--- Can also be shown with `:InspectTree`. *:InspectTree*
---
---@param 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.
+--- - lang (string|nil): The language of the source buffer. If omitted, detect
+--- from the filetype of the source buffer.
--- - bufnr (integer|nil): Buffer to draw the tree into. If omitted, a new
--- buffer is created.
--- - winid (integer|nil): Window id to display the tree buffer in. If omitted,