fix(lua): types for vim.api.keyset.win_config #32700

This commit is contained in:
Tomasz N
2025-03-10 14:01:51 +01:00
committed by GitHub
parent 85deb8d52b
commit 40a149e7f9
2 changed files with 16 additions and 7 deletions

View File

@ -293,9 +293,9 @@ error('Cannot require a meta file')
--- @field col? number --- @field col? number
--- @field width? integer --- @field width? integer
--- @field height? integer --- @field height? integer
--- @field anchor? string --- @field anchor? 'NW'|'NE'|'SW'|'SE'
--- @field relative? string --- @field relative? 'cursor'|'editor'|'laststatus'|'mouse'|'tabline'|'win'
--- @field split? string --- @field split? 'left'|'right'|'above'|'below'
--- @field win? integer --- @field win? integer
--- @field bufpos? integer[] --- @field bufpos? integer[]
--- @field external? boolean --- @field external? boolean
@ -303,12 +303,12 @@ error('Cannot require a meta file')
--- @field mouse? boolean --- @field mouse? boolean
--- @field vertical? boolean --- @field vertical? boolean
--- @field zindex? integer --- @field zindex? integer
--- @field border? any --- @field border? 'none'|'single'|'double'|'rounded'|'solid'|'shadow'|string[]
--- @field title? any --- @field title? any
--- @field title_pos? string --- @field title_pos? 'center'|'left'|'right'
--- @field footer? any --- @field footer? any
--- @field footer_pos? string --- @field footer_pos? 'center'|'left'|'right'
--- @field style? string --- @field style? 'minimal'
--- @field noautocmd? boolean --- @field noautocmd? boolean
--- @field fixed? boolean --- @field fixed? boolean
--- @field hide? boolean --- @field hide? boolean

View File

@ -51,6 +51,15 @@ local LUA_API_KEYSET_OVERRIDES = {
create_autocmd = { create_autocmd = {
callback = 'string|(fun(args: vim.api.keyset.create_autocmd.callback_args): boolean?)', callback = 'string|(fun(args: vim.api.keyset.create_autocmd.callback_args): boolean?)',
}, },
win_config = {
anchor = "'NW'|'NE'|'SW'|'SE'",
relative = "'cursor'|'editor'|'laststatus'|'mouse'|'tabline'|'win'",
split = "'left'|'right'|'above'|'below'",
border = "'none'|'single'|'double'|'rounded'|'solid'|'shadow'|string[]",
title_pos = "'center'|'left'|'right'",
footer_pos = "'center'|'left'|'right'",
style = "'minimal'",
},
} }
local LUA_API_PARAM_OVERRIDES = { local LUA_API_PARAM_OVERRIDES = {