Skip to content

Commit a470daf

Browse files
committed
fix: symlink file icons rendered when renderer.icons.show.file = false
1 parent 42c745a commit a470daf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ function Builder:build_symlink(node)
189189
symlink_formatted = string.format("%s%s%s", symlink_formatted, arrow, link_to)
190190
end
191191

192-
return { str = icon, hl = { "NvimTreeSymlinkIcon" } }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
192+
if self.opts.renderer.icons.show.file then
193+
return { str = icon, hl = { "NvimTreeSymlinkIcon" } }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
194+
else
195+
return { str = "", hl = {} }, { str = symlink_formatted, hl = { "NvimTreeSymlink" } }
196+
end
193197
end
194198

195199
---@private

0 commit comments

Comments
 (0)