Skip to content

fix(neotree): show symlinks as their targets - #260

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/neotree-symlinks
Aug 17, 2026
Merged

fcoury-oai merged 1 commit into
mainfrom
fcoury/neotree-symlinks

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Summary

Neo-tree currently drops symlinks because directory listings accept only regular files and directories. This makes linked folders, such as shared skill directories, disappear from the tree.

Classify symlinks by their target while keeping the link's original path. Linked folders now expand and use the existing folder-first alphabetical sort; linked files open normally. Unresolved links remain visible as files, while links to sockets and other unsupported file types remain hidden. Directory scans stay shallow, and file-operation safeguards are unchanged.

How to Test

  1. Create a directory containing a regular folder, a symlink to another folder, and a symlink to a file. Run cargo run -- --root <directory> and press Ctrl-e.
  2. Confirm both folders appear in alphabetical order before files. Expand the linked folder and open a child; the tree should retain the link's path.
  3. Add a broken link and a self-referential link. Refresh with R; both should remain visible without hanging the tree.

Automated validation passed:

  • cargo test --locked --lib directory_listing_ -- --test-threads=1 — 5 tests, including alias sorting, external directories, broken links, loops, and socket filtering.
  • cargo test --locked --lib plugin::runtime::tests::neotree_ -- --test-threads=1 — 10 interaction tests.
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • cargo build --locked --bin red

@fcoury-oai
fcoury-oai merged commit b5add6d into main Aug 17, 2026
19 of 20 checks passed
@fcoury-oai
fcoury-oai deleted the fcoury/neotree-symlinks branch August 17, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant