mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker): load config for getting layout
This commit is contained in:
parent
15cd5901d9
commit
73fc653da9
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ end
|
|||
--- Resolve the layout configuration
|
||||
---@param opts snacks.picker.Config|string
|
||||
function M.layout(opts)
|
||||
opts = type(opts) == "string" and { layout = { preset = opts } } or opts
|
||||
if type(opts) == "string" then
|
||||
opts = M.get({ layout = { preset = opts } })
|
||||
end
|
||||
local layouts = require("snacks.picker.config.layouts")
|
||||
local layout = M.resolve(opts.layout or {}, opts.source)
|
||||
if layout.layout then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue