Replies: 1 comment
-
snacks.nvim/lua/snacks/picker/config/layouts.lua Lines 106 to 125 in bc0630e layout = {
-- Base on `dropdown` layout
-- https://github.com/folke/snacks.nvim/blob/bc0630e43be5699bb94dadc302c0d21615421d93/lua/snacks/picker/config/layouts.lua#L106-L125
fullscreen = true,
layout = {
backdrop = false,
row = 1,
width = 0.4,
min_width = 80,
height = 0.8,
border = "none",
box = "vertical",
{
box = "vertical",
border = "rounded",
title = "{title} {live} {flags}",
title_pos = "center",
{ win = "input", height = 1, border = "bottom" },
{ win = "list", border = "none" },
},
-- NOTE: Swapped
{ win = "preview", title = "{preview}", height = 0.4, border = "rounded" },
},
}, Technically, the upper layout = function()
local layout = vim.deepcopy(require('snacks.picker.config.layouts').dropdown)
-- Config
layout.fullscreen = true
-- Swap
local preview = layout.layout[1]
layout.layout[1] = layout.layout[2]
layout.layout[2] = preview
return layout
end, But I don't recommend this approach. It might behave differently in other contexts. For example, you can’t do this kind of thing in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using the dropdown layout, I want the preview be at the bottom and the result on the top.
How do I accomplish this?
Config
Beta Was this translation helpful? Give feedback.
All reactions