feat(config): get config for snack with defaults and custom opts

This commit is contained in:
Folke Lemaitre 2024-11-04 10:14:38 +01:00
parent 7ceeb47e54
commit b3d08beb8c
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 5 additions and 5 deletions

View file

@ -107,7 +107,7 @@ function M.new(opts)
local self = setmetatable({}, { __index = M })
id = id + 1
self.id = id
opts = vim.tbl_deep_extend("force", {}, Snacks.config.get("float", defaults), opts or {})
opts = Snacks.config.get("float", defaults, opts)
opts =
vim.tbl_deep_extend("force", {}, vim.deepcopy(opts.position == "float" and defaults_float or defaults_split), opts)
if opts.win.style == "minimal" then