passthrough win_border to nvim-fzf (to enable custom border characters)

main
bhagwan 3 years ago
parent 192a386087
commit e6ad43e030

@ -138,7 +138,8 @@ require'fzf-lua'.setup {
win_width = 0.80, -- window width
win_row = 0.30, -- window row position (0=top, 1=bottom)
win_col = 0.50, -- window col position (0=left, 1=right)
win_border = true, -- window border?
-- win_border = false, -- window border? or borderchars?
win_border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' },
fzf_args = '', -- adv: fzf extra args, empty unless adv
fzf_layout = 'reverse', -- fzf '--layout='
preview_cmd = '', -- 'head -n $FZF_PREVIEW_LINES',

@ -10,7 +10,7 @@ local M = {}
local getopt = function(opts, key, expected_type, default)
if opts and opts[key] ~= nil then
if type(opts[key]) == expected_type then
if expected_type == "any" or type(opts[key]) == expected_type then
return opts[key]
else
utils.info(
@ -50,7 +50,7 @@ function M.setup(opts)
win_width = "number",
win_row = "number",
win_col = "number",
win_border = "boolean",
win_border = "any", -- boolean|table (borderchars)
default_prompt = "string",
fzf_args = "string",
fzf_layout = "string",

Loading…
Cancel
Save