Skip to content
Merged
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
11 changes: 10 additions & 1 deletion lua/telescope/_extensions/file_browser/fs_stat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,21 @@ M.mode = {
right_justify = true,
display = function(entry)
local owner, group, other = string.format("%3o", entry.stat.mode):match "(.)(.)(.)$"
local stat = vim.tbl_flatten {

local stat = {
mode_type_map[entry.lstat.type] or "-",
mode_perm_map[owner],
mode_perm_map[group],
mode_perm_map[other],
}

-- TODO: remove when dropping support for Nvim 0.9
if vim.fn.has "nvim-0.10" == 1 then
stat = vim.iter(stat):flatten():totable()
else
stat = vim.tbl_flatten(stat)
end

local highlights = {}
for i, char in ipairs(stat) do
local hl = color_hash[char]
Expand Down
Loading