diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-12-17 13:43:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 13:43:46 +0100 |
commit | 1c4794944deb734b24b4a424c50b766a96e050dd (patch) | |
tree | e1ccf4ccce199b19e1b98d2c6b2cc179a1fa25c1 /runtime/doc/lua.txt | |
parent | d65684f0c755a9341412423543b65ec872196440 (diff) | |
parent | ef91146efcece1b6d97152251e7137d301146189 (diff) | |
download | rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.gz rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.tar.bz2 rneovim-1c4794944deb734b24b4a424c50b766a96e050dd.zip |
Merge pull request #21393 from folke/highlight_show
feat(lsp): add function to get semantic tokens at cursor
feat: `vim.inspect_pos()`, `vim.show_pos()` and `:Inspect[!]`
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r-- | runtime/doc/lua.txt | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 5a1c186192..9c98ed7771 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1504,6 +1504,56 @@ schedule_wrap({cb}) *vim.schedule_wrap()* |vim.in_fast_event()| +============================================================================== +Lua module: inspector *lua-inspector* + +inspect_pos({bufnr}, {row}, {col}, {filter}) *vim.inspect_pos()* + Get all the items at a given buffer position. + + Can also be pretty-printed with `:Inspect!`. *:Inspect!* + + Parameters: ~ + • {bufnr} (number|nil) defaults to the current buffer + • {row} (number|nil) row to inspect, 0-based. Defaults to the row of + the current cursor + • {col} (number|nil) col to inspect, 0-based. Defaults to the col of + the current cursor + • {filter} (table|nil) a table with key-value pairs to filter the items + • syntax (boolean): include syntax based highlight groups + (defaults to true) + • treesitter (boolean): include treesitter based highlight + groups (defaults to true) + • extmarks (boolean|"all"): include extmarks. When `all`, + then extmarks without a `hl_group` will also be included + (defaults to true) + • semantic_tokens (boolean): include semantic tokens + (defaults to true) + + Return: ~ + (table) a table with the following key-value pairs. Items are in + "traversal order": + • treesitter: a list of treesitter captures + • syntax: a list of syntax groups + • semantic_tokens: a list of semantic tokens + • extmarks: a list of extmarks + • buffer: the buffer used to get the items + • row: the row used to get the items + • col: the col used to get the items + +show_pos({bufnr}, {row}, {col}, {filter}) *vim.show_pos()* + Show all the items at a given buffer position. + + Can also be shown with `:Inspect`. *:Inspect* + + Parameters: ~ + • {bufnr} (number|nil) defaults to the current buffer + • {row} (number|nil) row to inspect, 0-based. Defaults to the row of + the current cursor + • {col} (number|nil) col to inspect, 0-based. Defaults to the col of + the current cursor + • {filter} (table|nil) see |vim.inspect_pos()| + + deep_equal({a}, {b}) *vim.deep_equal()* |