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

FEATURE: non-git ignore files #1535

Open
1 task done
CosmicToast opened this issue Jul 28, 2024 · 1 comment
Open
1 task done

FEATURE: non-git ignore files #1535

CosmicToast opened this issue Jul 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@CosmicToast
Copy link

Did you check the docs?

  • I have read all the docs.

Is your feature request related to a problem? Please describe.

While it's nice to have gitignore support, there's no support for gitignore-style ignore files, which are present in the wild.
These range from .ignore, to .fdignore, .rgignore and so on.

Describe the solution you'd like.

I would like neotree to automatically ignore patterns specified in .neotreeignore and .ignore, as it does for .gitignore.
I'd also like the list of ignore filenames to be configurable, i.e. the default is {'.neotreeignore', '.ignore'}, but the default can be changed.

Describe alternatives you've considered.

The current expected way to handle this are global ignore rules and (to a lesser extent) nesting rules.
These are not per-directory, and therefore don't offer the same type of flexibility.

Furthermore, most of my use-cases outside of gitignore are indeed outside of git directories.
Since the neotree support depends on git check-ignore, it does not work outside of git repositories.

Additional Context

As an example, I ported my neovim config to fennel using nfnl. As such, I'd like to ignore .lua files in my neovim config dir.
However, I cannot do this in a satisfactory and cross-platform way. With this feature I would simply have a .ignore containing *.lua in the root of the config dir.
If I needed to have some lua file not get ignored, I could add a ! pattern for that file.

I did a quick look and I didn't find any properly compliant gitignore implementations in lua, so I'll probably write one shortly.
Once it's ready I'll mention it in this issue, but if you have alternative ideas do let me know :)

@CosmicToast CosmicToast added the enhancement New feature or request label Jul 28, 2024
@NullVoxPopuli
Copy link

A neotreeignore file would be amazing.

I've been working with tree-sitter grammars recently, and most of the repos are generated, and I want to hide all that from my file browser -- they can't be gitignored due to tree-sitter wanting to integrate with 5+ different language ecosystems, and I've been told to "just accept it" 🙈 (which is fine, I guess, just feels messy and overwhelming) -- so, if there was a way to configure a way to just hide all those files from neotree (leaving basically just a few things) -- that'd be great -- I know this can be configured in my neovim config, but I'd like to have it checked in to my repo, so that other folks can also have those hidden files.

(I also need to find a config for vscode that does this same behavior)

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