kyazdani42 / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filter exclude does not take into account gitignored files

good-idea opened this issue · comments

Is it possible to whitelist a file that is otherwise ignored, via .gitignore files or otherwise?

I imagine my use case is a common one -- I've ignored my .env files, but need to edit them frequently that I'd like them to show up in the explorer.

I thought this might do the trick:

  filters = {
    custom = {

but no dice.

did you ever find a solution for this?

- |filters.exclude|: list of directories or files to exclude from filtering
    (will always be shown)
      type: `{string}`
      default: `{}`

reopen if you cannot make it work.

@kyazdani42 Did not work for me, trying to exclude .env because i want to view/edit that file

  filters = {
      dotfiles = false,
      custom = {'node_modules', '.cache'},
      exclude = {'.env'}

you are right, the current code does not allow excluding the gitignored files. Not sure if this is a bug or if this was intended by the original author. I'll change the title a bit.

Any progress on this?

I would like to do

  filters = {
      exclude = { 'node_modules' },

no progress yet, i didn't have time to work on this :) I have very few bugs left to fix, this might be fixed in the next weeks.

ezoic increase your site revenue