Skip to content

Commit 73a90f6

Browse files
authored
fix(components): enable using symlink_target on all sources by (#660)
fixes #635
1 parent a55f11c commit 73a90f6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

lua/neo-tree/sources/common/components.lua

+11
Original file line numberDiff line numberDiff line change
@@ -414,4 +414,15 @@ M.indent = function(config, node, state)
414414
return indent
415415
end
416416

417+
M.symlink_target = function(config, node, state)
418+
if node.is_link then
419+
return {
420+
text = string.format(" ➛ %s", node.link_to),
421+
highlight = config.highlight or highlights.SYMBOLIC_LINK_TARGET,
422+
}
423+
else
424+
return {}
425+
end
426+
end
427+
417428
return M

lua/neo-tree/sources/filesystem/components.lua

-11
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,4 @@ M.current_filter = function(config, node, state)
3737
}
3838
end
3939

40-
M.symlink_target = function(config, node, state)
41-
if node.is_link then
42-
return {
43-
text = string.format(" ➛ %s", node.link_to),
44-
highlight = config.highlight or highlights.SYMBOLIC_LINK_TARGET,
45-
}
46-
else
47-
return {}
48-
end
49-
end
50-
5140
return vim.tbl_deep_extend("force", common, M)

0 commit comments

Comments
 (0)