Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to show git ignored files with indicator #148

Closed
cseickel opened this issue Feb 16, 2022 · 5 comments
Closed

Add option to show git ignored files with indicator #148

cseickel opened this issue Feb 16, 2022 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@cseickel
Copy link
Contributor

One more idea (let me know if it is better to open a new issue):
For the gitignored files, how about adding an option to show them with a symbol like [I], or hide them directly?
E.g.,

require("neo-tree").setup({
	filesystem = {
		filters = {
			respect_gitignore = true,
			gitignore_treatmente = 'symbol'	-- can be 'hidden' or 'symbol'
		}
	}
})

For the symbols, nvim-tree uses symbols for different status of files
image

I think this is a good addition to neo-tree

Originally posted by @yanzhang0219 in #147 (comment)

@cseickel cseickel added the enhancement New feature or request label Feb 16, 2022
@cseickel
Copy link
Contributor Author

I think this is a good idea @yanzhang0219, I personally like to show any "hidden" files in a different highlight group as well. I'll add both options.

@cseickel
Copy link
Contributor Author

cseickel commented Mar 5, 2022

Anyone interested in this feature, please see the discussion at: #171

cseickel added a commit that referenced this issue Mar 6, 2022
toggle hidden with distinct highlight. closes #149, closes #148
cseickel added a commit that referenced this issue Mar 6, 2022
…172)

closes #148, closes #149

BREAKING CHANGE: refactor `filters` config options.
@cseickel
Copy link
Contributor Author

cseickel commented Mar 6, 2022

This has been partially implemented in a new v2.x branch. The way it works now, if you show hidden files, git ignored files will be marked with it's own highlight group (grey) and use the [!!] marker. I'll also update or add a new component that can replace these codes with symbols in a future update.

v2.x has breaking changes to the filters config. These options have been completely changed:

    require("neo-tree").setup({
      filesystem = {
        filtered_items = {
          visible = false, -- when true, they will just be displayed differently than normal items
          hide_dotfiles = true,
          hide_gitignored = true,
          hide_by_name = {
            ".DS_Store",
            "thumbs.db"
            --"node_modules"
          },
          never_show = { -- remains hidden even if visible is toggled to true
            --".DS_Store",
            --"thumbs.db"
          },
        },
      }
    })

WARNING: v2.x is brand new and far from release. It will have many breaking changes, although I will alert you to these changes and try to auto migrate your existing config options.

@cseickel
Copy link
Contributor Author

cseickel commented Mar 9, 2022

I've added my own set of symbols that I like better:

image

image

This will be merged to 2.x soon, I''m not sure when 2,x will be released. Let me know if you have any feedback.

@nyngwang
Copy link

nyngwang commented Mar 10, 2022

I want this cool feature AS SOON AS POSSIBLE. (by a main branch user)

Update: I just migrated to the v2.x-branch and using this feature!

@cseickel cseickel added this to the v2.0 milestone Mar 15, 2022
cseickel added a commit that referenced this issue Mar 17, 2022
…172)

closes #148, closes #149

BREAKING CHANGE: refactor `filters` config options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants