Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lua/neo-tree/sources/common/components.lua
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,13 @@ end

---@param config neotree.Component.Common.SymlinkTarget
M.symlink_target = function(config, node, _)
if node.is_link then
return {
text = string.format(config.text_format, node.link_to),
highlight = config.highlight or highlights.SYMBOLIC_LINK_TARGET,
}
else
if not node.is_link then
return {}
end
return {
text = string.format(config.text_format, node.link_to),
highlight = config.highlight or highlights.SYMBOLIC_LINK_TARGET,
}
end

---@class (exact) neotree.Component.Common.Type : neotree.Component
Expand Down
2 changes: 1 addition & 1 deletion lua/neo-tree/sources/common/file-items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function create_item(context, path, _type, bufnr)
end
if item.type == "link" then
item.is_link = true
item.link_to = uv.fs_realpath(path)
item.link_to = uv.fs_readlink(path)
if item.link_to ~= nil then
item.type = uv.fs_stat(item.link_to).type
end
Expand Down
Loading