mini.files ignore files in .gitignore #396
-
Hello, I have switched from nvim-tree to mini.files, and it has been generally seamless. I have found the toggle dotfiles function in the docs and it has been helpful. Would it be possible for the filter to depend on .gitignore similar to nvim-tree? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi!
Sure, this is possible with custom To respect '.gitignore', its code should find proper '.gitignore' file(s) and decide whether input path should be ignored. Alternatively, it could use 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. |
Beta Was this translation helpful? Give feedback.
Hi!
Sure, this is possible with custom
content.filter
function. Albeit it is slightly tricky ascontent.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.