mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(types): nvim_get_win_config return type #35639
This commit is contained in:
@@ -17,6 +17,7 @@ local M = {
|
||||
},
|
||||
},
|
||||
}
|
||||
--- @type vim.api.keyset.win_config
|
||||
local wincfg = { -- Default cfg for nvim_open_win().
|
||||
relative = 'laststatus',
|
||||
style = 'minimal',
|
||||
|
||||
2
runtime/lua/vim/_meta/api.lua
generated
2
runtime/lua/vim/_meta/api.lua
generated
@@ -2415,7 +2415,7 @@ function vim.api.nvim_win_get_buf(window) end
|
||||
--- `relative` is empty for normal windows.
|
||||
---
|
||||
--- @param window integer `window-ID`, or 0 for current window
|
||||
--- @return vim.api.keyset.win_config # Map defining the window configuration, see |nvim_open_win()|
|
||||
--- @return vim.api.keyset.win_config_ret # Map defining the window configuration, see |nvim_open_win()|
|
||||
function vim.api.nvim_win_get_config(window) end
|
||||
|
||||
--- Gets the (1,0)-indexed, buffer-relative cursor position for a given window
|
||||
|
||||
@@ -247,3 +247,24 @@ error('Cannot require a meta file')
|
||||
--- @field fill integer
|
||||
--- @field end_row integer
|
||||
--- @field end_vcol integer
|
||||
|
||||
-- Inherit from vim.api.keyset.win_config so this type can be passed to nvim_open_win().
|
||||
-- Because of this we only need to define the fields with different types (nil or non-nil).
|
||||
|
||||
--- @class vim.api.keyset.win_config_ret : vim.api.keyset.win_config
|
||||
--- @field focusable boolean
|
||||
--- @field external boolean
|
||||
--- @field hide boolean
|
||||
--- @field mouse boolean
|
||||
--- @field width integer
|
||||
--- @field height integer
|
||||
--- @field relative 'cursor'|'editor'|'laststatus'|'mouse'|'tabline'|'win'
|
||||
---
|
||||
--- @field noautocmd nil
|
||||
--- @field title nil
|
||||
--- @field title_pos nil
|
||||
--- @field footer nil
|
||||
--- @field footer_pos nil
|
||||
--- @field style nil
|
||||
--- @field fixed nil
|
||||
--- @field vertical nil
|
||||
|
||||
Reference in New Issue
Block a user