feat(file-popup): add actions.file_popup.open_win_config
* file-popup: add nvim_open_win configuration * docs: update file-popup configuration
This commit is contained in:
@@ -28,16 +28,12 @@ local function setup_window(node)
|
||||
local max_width = vim.fn.max(vim.tbl_map(function(n)
|
||||
return #n
|
||||
end, lines))
|
||||
local winnr = a.nvim_open_win(0, false, {
|
||||
col = 1,
|
||||
row = 1,
|
||||
relative = "cursor",
|
||||
local open_win_config = vim.tbl_extend("force", M.open_win_config, {
|
||||
width = max_width + 1,
|
||||
height = #lines,
|
||||
border = "shadow",
|
||||
noautocmd = true,
|
||||
style = "minimal",
|
||||
})
|
||||
local winnr = a.nvim_open_win(0, false, open_win_config)
|
||||
current_popup = {
|
||||
winnr = winnr,
|
||||
file_path = node.absolute_path,
|
||||
@@ -78,4 +74,8 @@ function M.toggle_file_info(node)
|
||||
})
|
||||
end
|
||||
|
||||
function M.setup(opts)
|
||||
M.open_win_config = opts.actions.file_popup.open_win_config
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user