docs(inspect): number → integer (#22511)

This commit is contained in:
Jaehwang Jung 2023-03-04 22:05:46 +09:00 committed by GitHub
parent ccd2cc1abd
commit 1f07307aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 17 deletions

View File

@ -1542,11 +1542,11 @@ inspect_pos({bufnr}, {row}, {col}, {filter}) *vim.inspect_pos()*
Can also be pretty-printed with `:Inspect!`. *:Inspect!* Can also be pretty-printed with `:Inspect!`. *:Inspect!*
Parameters: ~ Parameters: ~
• {bufnr} (number|nil) defaults to the current buffer • {bufnr} (integer|nil) defaults to the current buffer
• {row} (number|nil) row to inspect, 0-based. Defaults to the row of • {row} (integer|nil) row to inspect, 0-based. Defaults to the row
the current cursor of the current cursor
• {col} (number|nil) col to inspect, 0-based. Defaults to the col of • {col} (integer|nil) col to inspect, 0-based. Defaults to the col
the current cursor of the current cursor
• {filter} (table|nil) a table with key-value pairs to filter the items • {filter} (table|nil) a table with key-value pairs to filter the items
• syntax (boolean): include syntax based highlight groups • syntax (boolean): include syntax based highlight groups
(defaults to true) (defaults to true)
@ -1575,11 +1575,11 @@ show_pos({bufnr}, {row}, {col}, {filter}) *vim.show_pos()*
Can also be shown with `:Inspect`. *:Inspect* Can also be shown with `:Inspect`. *:Inspect*
Parameters: ~ Parameters: ~
• {bufnr} (number|nil) defaults to the current buffer • {bufnr} (integer|nil) defaults to the current buffer
• {row} (number|nil) row to inspect, 0-based. Defaults to the row of • {row} (integer|nil) row to inspect, 0-based. Defaults to the row
the current cursor of the current cursor
• {col} (number|nil) col to inspect, 0-based. Defaults to the col of • {col} (integer|nil) col to inspect, 0-based. Defaults to the col
the current cursor of the current cursor
• {filter} (table|nil) see |vim.inspect_pos()| • {filter} (table|nil) see |vim.inspect_pos()|

View File

@ -14,15 +14,15 @@ local defaults = {
--- ---
---Can also be pretty-printed with `:Inspect!`. *:Inspect!* ---Can also be pretty-printed with `:Inspect!`. *:Inspect!*
--- ---
---@param bufnr? number defaults to the current buffer ---@param bufnr? integer defaults to the current buffer
---@param row? number row to inspect, 0-based. Defaults to the row of the current cursor ---@param row? integer row to inspect, 0-based. Defaults to the row of the current cursor
---@param col? number col to inspect, 0-based. Defaults to the col of the current cursor ---@param col? integer col to inspect, 0-based. Defaults to the col of the current cursor
---@param filter? InspectorFilter (table|nil) a table with key-value pairs to filter the items ---@param filter? InspectorFilter (table|nil) a table with key-value pairs to filter the items
--- - syntax (boolean): include syntax based highlight groups (defaults to true) --- - syntax (boolean): include syntax based highlight groups (defaults to true)
--- - treesitter (boolean): include treesitter 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) --- - 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) --- - semantic_tokens (boolean): include semantic tokens (defaults to true)
---@return {treesitter:table,syntax:table,extmarks:table,semantic_tokens:table,buffer:number,col:number,row:number} (table) a table with the following key-value pairs. Items are in "traversal order": ---@return {treesitter:table,syntax:table,extmarks:table,semantic_tokens:table,buffer:integer,col:integer,row:integer} (table) a table with the following key-value pairs. Items are in "traversal order":
--- - treesitter: a list of treesitter captures --- - treesitter: a list of treesitter captures
--- - syntax: a list of syntax groups --- - syntax: a list of syntax groups
--- - semantic_tokens: a list of semantic tokens --- - semantic_tokens: a list of semantic tokens
@ -129,9 +129,9 @@ end
--- ---
---Can also be shown with `:Inspect`. *:Inspect* ---Can also be shown with `:Inspect`. *:Inspect*
--- ---
---@param bufnr? number defaults to the current buffer ---@param bufnr? integer defaults to the current buffer
---@param row? number row to inspect, 0-based. Defaults to the row of the current cursor ---@param row? integer row to inspect, 0-based. Defaults to the row of the current cursor
---@param col? number col to inspect, 0-based. Defaults to the col of the current cursor ---@param col? integer col to inspect, 0-based. Defaults to the col of the current cursor
---@param filter? InspectorFilter (table|nil) see |vim.inspect_pos()| ---@param filter? InspectorFilter (table|nil) see |vim.inspect_pos()|
function vim.show_pos(bufnr, row, col, filter) function vim.show_pos(bufnr, row, col, filter)
local items = vim.inspect_pos(bufnr, row, col, filter) local items = vim.inspect_pos(bufnr, row, col, filter)