Skip to content

Commit 69c4e93

Browse files
committed
feat: use add_trailing also for symlink destination
1 parent 1eda256 commit 69c4e93

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/nvim-tree-lua.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ Use nvim-tree in a floating window.
855855
5.3 OPTS: RENDERER *nvim-tree-opts-renderer*
856856

857857
*nvim-tree.renderer.add_trailing*
858-
Appends a trailing slash to folder names.
858+
Appends a trailing slash to folder and symlink folder destination names.
859859
Type: `boolean`, Default: `false`
860860

861861
*nvim-tree.renderer.group_empty*

lua/nvim-tree/node/directory-link.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ function DirectoryLinkNode:highlighted_name()
6464

6565
if self.explorer.opts.renderer.symlink_destination then
6666
local link_to = utils.path_relative(self.link_to, self.explorer.absolute_path)
67+
if self.explorer.opts.renderer.add_trailing then
68+
link_to = utils.path_add_trailing(link_to)
69+
end
6770

6871
name.str = string.format("%s%s%s", name.str, self.explorer.opts.renderer.icons.symlink_arrow, link_to)
6972
name.hl = { "NvimTreeSymlinkFolderName" }

0 commit comments

Comments
 (0)