diff options
-rw-r--r-- | runtime/doc/diagnostic.txt | 8 | ||||
-rw-r--r-- | runtime/doc/lua-guide.txt | 2 | ||||
-rw-r--r-- | runtime/doc/treesitter. | 0 | ||||
-rw-r--r-- | runtime/doc/treesitter.txt | 7 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter/query.lua | 4 |
6 files changed, 11 insertions, 12 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt index 7066a3739a..c661bf02bf 100644 --- a/runtime/doc/diagnostic.txt +++ b/runtime/doc/diagnostic.txt @@ -40,15 +40,15 @@ requires a namespace. *diagnostic-structure* A diagnostic is a Lua table with the following keys. Required keys are -indicated with (*): +indicated with (+): bufnr: Buffer number - lnum(*): The starting line of the diagnostic + lnum(+): The starting line of the diagnostic end_lnum: The final line of the diagnostic - col(*): The starting column of the diagnostic + col(+): The starting column of the diagnostic end_col: The final column of the diagnostic severity: The severity of the diagnostic |vim.diagnostic.severity| - message(*): The diagnostic text + message(+): The diagnostic text source: The source of the diagnostic code: The diagnostic code user_data: Arbitrary data plugins or users can add diff --git a/runtime/doc/lua-guide.txt b/runtime/doc/lua-guide.txt index 236905a077..8ea84f8c60 100644 --- a/runtime/doc/lua-guide.txt +++ b/runtime/doc/lua-guide.txt @@ -71,7 +71,7 @@ local keyword are not accessible outside of the command. This won't work: < You can also use `:lua=`, which is the same as `:lua vim.pretty_print(...)`, to conveniently check the value of a variable or a table: ->lua +>vim :lua=package < To run a Lua script in an external file, you can use the |:source| command diff --git a/runtime/doc/treesitter. b/runtime/doc/treesitter. deleted file mode 100644 index e69de29bb2..0000000000 --- a/runtime/doc/treesitter. +++ /dev/null diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 99fe55b6cb..3f505e5d19 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -505,8 +505,7 @@ get_captures_at_pos({bufnr}, {row}, {col}) • {col} (integer) Position column Return: ~ - table[] List of captures `{ capture = "capture name", metadata = { ... - } }` + table[] List of captures `{ capture = "name", metadata = { ... } }` get_node({opts}) *vim.treesitter.get_node()* Returns the smallest named node at the given position @@ -838,7 +837,7 @@ Query:iter_captures({self}, {node}, {source}, {start}, {stop}) -- typically useful info about the node: local type = node:type() -- type of the captured node local row1, col1, row2, col2 = node:range() -- range of the capture - ... use the info here ... + -- ... use the info here ... end < @@ -871,7 +870,7 @@ Query:iter_matches({self}, {node}, {source}, {start}, {stop}) local node_data = metadata[id] -- Node level metadata - ... use the info here ... + -- ... use the info here ... end end < diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index c4df5b2d24..44922bbc4d 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -218,7 +218,7 @@ end ---@param row integer Position row ---@param col integer Position column --- ----@return table[] List of captures `{ capture = "capture name", metadata = { ... } }` +---@return table[] List of captures `{ capture = "name", metadata = { ... } }` function M.get_captures_at_pos(bufnr, row, col) if bufnr == 0 then bufnr = a.nvim_get_current_buf() diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index 83910316a6..58a29f2fe0 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -639,7 +639,7 @@ end --- -- typically useful info about the node: --- local type = node:type() -- type of the captured node --- local row1, col1, row2, col2 = node:range() -- range of the capture ---- ... use the info here ... +--- -- ... use the info here ... --- end --- </pre> --- @@ -693,7 +693,7 @@ end --- --- local node_data = metadata[id] -- Node level metadata --- ---- ... use the info here ... +--- -- ... use the info here ... --- end --- end --- </pre> |