fix: symlink file icons rendered when renderer.icons.show.file = false

This commit is contained in:
Alexander Courtis 2024-11-03 12:06:03 +11:00
parent 42c745ade5
commit a470daf357

View File

@ -189,7 +189,11 @@ function Builder:build_symlink(node)
symlink_formatted = string.format("%s%s%s", symlink_formatted, arrow, link_to)
end
return { str = icon, hl = { "NvimTreeSymlinkIcon" } }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
if self.opts.renderer.icons.show.file then
return { str = icon, hl = { "NvimTreeSymlinkIcon" } }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
else
return { str = "", hl = {} }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
end
end
---@private