nvim-tree/nvim-tree.lua

View Currently Enabled Filters

Opened this issue · 3 comments

Problem

After toggling multiple filters several times, I am unsure which filters are currently enabled.
For example, if I want to switch to having only the Bookmark filter enabled, I have to guess by toggling whether Git Ignore, Git Clean, or Buffer have been disabled, which is error-prone.

Proposed Solution 1

  • Add a new shortcut key.
Image
  • When the shortcut key is pressed, a window appears displaying the list of currently enabled filters.
Image

(The layout and text in the example are only for reference — as long as it can show the enabled filters in the end, that’s fine)

Proposed Solution 2

  • Add a shortcut key to reset the filters (for example, r). That way, I can press "rB" to switch to having only the Bookmark filter enabled.

see also : discussions#3203

I like both of those, and I reckon we should do both.

How about additional Option 3:

  • add a section to the bottom, similar to hidden count
  • same text as Option 1
  • maybe only show enabled
  • something like
   config.mk                 │~
  󰡨 Dockerfile                │~
   GNUmakefile               │~
   LICENSE                   │~
  󰂺 README.md                 │~
  (13 hidden)                 │~
  Enabled filters:            |~
    Git Clean                 |~
    Bookmarks                 |~
  Disabled filters:           |~
    Git Clean                 |~
    No Buffer                 |~

or

   config.mk                 │~
  󰡨 Dockerfile                │~
   GNUmakefile               │~
   LICENSE                   │~
  󰂺 README.md                 │~
  (13 Git Clean, Bookmarks)   |~

Awesome design! This makes it easier to use without adding a new shortcut key. I think Option 3 can replace Option 1.

Although a very long file tree can push it out of the window, after enabling filters there are usually only a few files shown, so there’s enough space to display it. And even if the file list is long, it can still be viewed using the G command.

Yes, Option 3 should only show enabled.

Awesome design! This makes it easier to use without adding a new shortcut key. I think Option 3 can replace Option 1.

Let's build all and see what feels good.