Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ require('fff').setup({
-- Border style for the picker windows. Leave unset (nil) to follow the
-- global `vim.o.winborder`; set it to override fff's borders independently.
border = nil, -- 'single' | 'double' | 'rounded' | 'solid' | 'shadow' | 'none'
-- border = {
-- { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
-- { ' ', ' ', ' ', ' ', ' ', ' ' },
-- },

flex = { size = 130, wrap = 'top' },
min_list_height = 10, -- do not display anything except the list below this threshold
show_scrollbar = true,
Expand Down
2 changes: 1 addition & 1 deletion lua/fff/conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local M = {}
--- @field min_list_height number
--- @field show_scrollbar boolean
--- @field path_shorten_strategy string
--- @field border? 'single'|'double'|'rounded'|'solid'|'shadow'|'none' Border preset; falls back to `vim.o.winborder` when nil
--- @field border? 'single'|'double'|'rounded'|'solid'|'shadow'|'none'|table<string[],string[]> Border preset; falls back to `vim.o.winborder` when nil

--- @class FffPreviewConfig
--- @field enabled boolean
Expand Down
3 changes: 3 additions & 0 deletions lua/fff/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ local function get_border_chars(config)
if border == nil or border == '' then border = vim.o.winborder end
if border == nil or border == '' then border = 'single' end

if type(border) == 'table' then
if #border == 2 and type(border[1]) == 'table' and type(border[2]) == 'table' then return border[1], border[2] end
end
if BORDER_PRESETS[border] then return BORDER_PRESETS[border], T_JUNCTION_PRESETS[border] end
return BORDER_PRESETS.single, T_JUNCTION_PRESETS.single
end
Expand Down
Loading