mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
feat(picker.format): directory formatting
This commit is contained in:
parent
7ad414e8a9
commit
847509e12c
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue