Skip to content

feat(neotree): add recursive tree search - #290

Merged
fcoury-oai merged 1 commit into
mainfrom
fcoury/neotree-search
Aug 21, 2026
Merged

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

Conversation

@fcoury-oai

Copy link
Copy Markdown
Collaborator

Why

Neo-tree can only navigate directories that have already been expanded, so finding a nested file requires manually opening folders or abandoning the tree for a separate picker. Large directory snapshots can also hide otherwise valid results.

What changed

  • Add inline recursive fuzzy search with /, directory-only search with D, and persistent filtering with f. Search complete workspace-relative paths, expand matching ancestors, highlight matching filename characters, and restore or preserve the tree with Escape, Shift-Enter, Ctrl-Enter, and Ctrl-x.
  • Share native, asynchronous workspace discovery with the existing file picker. Respect Git ignore rules, preserve visible dotfiles, exclude Git metadata, bound indexing and rendered results, rank exact filename matches first, and invalidate cached paths after filesystem changes.
  • Extend row-panel and plugin host APIs to support inline search prompts and background path requests. Update Neo-tree help, getting-started documentation, and plugin API documentation.
  • Cover collapsed descendants, directory-only results, persistent filters, ignored paths, Unicode highlighting, cache invalidation, bounded listings, and Neo-tree core rendering.

How to Test

  1. Run cargo run --, press Ctrl-e to open Neo-tree, press /, and enter ui pick. Confirm src/ui/file_picker.rs appears under its automatically expanded parent directories, matching filename characters are highlighted, and Enter opens the file.
  2. Reopen Neo-tree and press D to confirm only matching directories appear. Press f, enter a query, and press Enter to keep the filtered tree visible; press Ctrl-x to restore the complete tree. Start another / search and press Escape to confirm the original expansion state returns.
  3. Search for a Git-ignored path or content inside .git and confirm neither appears; search for a visible dotfile such as .github and confirm it remains discoverable. Open Ctrl-p afterward and confirm the existing file picker still lists normal workspace files.
  4. Run cargo test workspace_paths::tests --lib and cargo test neotree --lib; expect the native search, collapsed-directory integration, directory-only, persistent-filter, and cache-invalidation regressions to pass.
  5. Run cargo run -p husk-cli -- test --locked plugins/neotree_core; expect all seven Neo-tree core tests, including highlighted match rendering, to pass.

Also verified the complete workspace test suite, cargo clippy --all-targets --all-features -- -D warnings, and cargo run -- --self-check.

@fcoury-oai
fcoury-oai merged commit 40e7ba2 into main Aug 21, 2026
19 checks passed
@fcoury-oai
fcoury-oai deleted the fcoury/neotree-search branch August 21, 2026 17:57
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