feat(picker.format): directory formatting

This commit is contained in:
Folke Lemaitre 2025-01-30 14:13:49 +01:00
parent 7ad414e8a9
commit 847509e12c

View file

@ -57,6 +57,9 @@ function M.filename(item, picker)
path = vim.fn.fnamemodify(path, ":t")
ret[#ret + 1] = { path, base_hl, field = "file" }
else
if item.dir then
path = path .. "/"
end
local dir, base = path:match("^(.*)/(.+)$")
if base and dir then
if picker.opts.formatters.file.filename_first then