AstroVimConfig/lua/plugins/action-preview.lua

39 lines
1.1 KiB
Lua
Raw Normal View History

2026-04-04 15:48:59 +00:00
return {
"actions-preview.nvim",
opts = function(_, opts)
local hl = require "actions-preview.highlight"
-- opts.diff = opts.diff or {}
-- opts.diff.ctxlen = 3
opts.highlight_command = {
hl.delta "/usr/bin/delta --no-gitconfig --side-by-side",
}
opts.backend = { "snacks" }
-- opts.telescope = opts.telescope or {}
opts.telescope = {
sorting_strategy = "ascending",
layout_strategy = "vertical",
layout_config = {
width = 0.8,
height = 0.9,
prompt_position = "top",
preview_cutoff = 20,
preview_height = function(_, _, max_lines) return max_lines - 15 end,
},
}
---@type snacks.picker.Config
opts.snacks = {
layout = {
preset = "vertical",
-- assert -- backdrop = false,
-- -- width = 0.8,
-- -- height = 0.9,
-- { win = "input", height = 1, border = "rounded" },
-- { win = "list", border = "rounded" },
-- { win = "preview", title = "{preview}", border = "rounded", grow = true },
},
}
return opts
end,
}