Skip to content

mini.files ignore files in .gitignore #396

Closed Answered by echasnovski
justEstif asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

Hi!

Would it be possible for the filter to depend on .gitignore similar to nvim-tree?

Sure, this is possible with custom content.filter function. Albeit it is slightly tricky as content.filter takes single file system entry as input.

To respect '.gitignore', its code should find proper '.gitignore' file(s) and decide whether input path should be ignored.

Alternatively, it could use git check-ignore shell command for each file path.

Another approach is to hard-code some common block patterns for yourself.


That said, it won't be built-in neither into 'mini.files' code nor documentation, as I strongly believe that file explorer should show all files present on the disk.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants