lint: stricter type checking

This commit is contained in:
Steven Arcangeli 2024-08-30 17:09:56 -07:00
parent f60bb7f793
commit 1360be5fda
9 changed files with 25 additions and 3 deletions

View file

@ -98,7 +98,7 @@ M.calculate_height = function(desired_height, opts)
)
end
---@class (exact) conform.WinLayout
---@class (exact) oil.WinLayout
---@field width integer
---@field height integer
---@field row integer
@ -139,14 +139,15 @@ end
---@param winid integer
---@param direction "above"|"below"|"left"|"right"|"auto"
---@param gap integer
---@return conform.WinLayout root_dim New dimensions of the original window
---@return conform.WinLayout new_dim New dimensions of the new window
---@return oil.WinLayout root_dim New dimensions of the original window
---@return oil.WinLayout new_dim New dimensions of the new window
M.split_window = function(winid, direction, gap)
if direction == "auto" then
direction = vim.o.splitright and "right" or "left"
end
local float_config = vim.api.nvim_win_get_config(winid)
---@type oil.WinLayout
local dim_root = {
width = float_config.width,
height = float_config.height,