fix(docs): wrong return value annotation for nvim_buf_get_extmarks

This commit is contained in:
JonnyKong 2024-08-25 03:57:02 +00:00 committed by Lewis Russell
parent cf44121f7f
commit b8135a76b7
3 changed files with 9 additions and 3 deletions

View File

@ -378,7 +378,7 @@ function vim.api.nvim_buf_get_commands(buffer, opts) end
--- • details: Whether to include the details dict
--- • hl_name: Whether to include highlight group name instead of
--- id, true if omitted
--- @return vim.api.keyset.get_extmark_item
--- @return vim.api.keyset.get_extmark_item_by_id
function vim.api.nvim_buf_get_extmark_by_id(buffer, ns_id, id, opts) end
--- Gets `extmarks` in "traversal order" from a `charwise` region defined by

View File

@ -43,11 +43,17 @@ error('Cannot require a meta file')
--- @field line_hl_group? string
--- @field cursorline_hl_group? string
--- @class vim.api.keyset.get_extmark_item
--- @class vim.api.keyset.get_extmark_item_by_id
--- @field [1] integer row
--- @field [2] integer col
--- @field [3] vim.api.keyset.extmark_details?
--- @class vim.api.keyset.get_extmark_item
--- @field [1] integer extmark_id
--- @field [2] integer row
--- @field [3] integer col
--- @field [4] vim.api.keyset.extmark_details?
--- @class vim.api.keyset.get_mark
--- @field [1] integer row
--- @field [2] integer col

View File

@ -20,7 +20,7 @@ local DEP_API_METADATA = 'build/funcs_metadata.mpack'
local LUA_API_RETURN_OVERRIDES = {
nvim_buf_get_command = 'table<string,vim.api.keyset.command_info>',
nvim_buf_get_extmark_by_id = 'vim.api.keyset.get_extmark_item',
nvim_buf_get_extmark_by_id = 'vim.api.keyset.get_extmark_item_by_id',
nvim_buf_get_extmarks = 'vim.api.keyset.get_extmark_item[]',
nvim_buf_get_keymap = 'vim.api.keyset.keymap[]',
nvim_get_autocmds = 'vim.api.keyset.get_autocmds.ret[]',