Skip to content

Commit ad1f3ef

Browse files
committed
feat(renderer): show symlink folder destination
fixes #980
1 parent 8d0c93d commit ad1f3ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/nvim-tree/renderer/builder.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ function Builder:_build_folder(node, padding, git_hl, git_icons_tbl)
112112
local icon = icons.get_folder_icon(node.open, node.link_to ~= nil, has_children)
113113

114114
local foldername = name .. self.trailing_slash
115+
if node.link_to and self.symlink_destination then
116+
local arrow = icons.i.symlink_arrow
117+
foldername = foldername .. arrow .. node.link_to
118+
end
119+
115120
local git_icons = self:_unwrap_git_data(git_icons_tbl, offset + #icon + (self.is_git_after and #foldername + 1 or 0))
116121
local fname_starts_at = offset + #icon + (self.is_git_after and 0 or #git_icons)
117122
local line = self:_format_line(padding .. icon, foldername, git_icons)

0 commit comments

Comments
 (0)