nvim-tree / nvim-tree/nvim-tree.lua

Hide folders without filter results in live filter

Open
#2,631 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug PR please
Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

Can this functionality be implemented utilising API?
Possibly. I have not checked the API much.

Is your feature request related to a problem? Please describe.
Using the filter command still lists folders that don't have filter results in them anyway and by default collapses folders.
This makes it hard to find the files that I actually am intending to find with a filter.

Describe the solution you'd like
A similar experience to neo-tree's filtering. (see screenshot)
image

Describe alternatives you've considered
I've tried setting always_show_folders = false but when I do, it will then only filter the current directory and not look for deeper directories.

I apologize if this is something already talked about here in the issues. I've tried to look around but can't sift through the lots of issues to find this use case. Please guide me to that thread if it is already existing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the live filter behavior in the file explorer, including the interaction between recursive filtering and always_show_folders = false. Compare the current result with the described neo-tree behavior and determine how folders with no matching files should appear. Done means filtering shows only relevant folders while still finding matches in deeper directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.