Skip to content
New issue

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

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

Already on GitHub? # to your account

Ignore files/folders now include wildignore option settings. #42

Open
wants to merge 4 commits into
base: vim9
Choose a base branch
from

Conversation

ubaldot
Copy link
Contributor

@ubaldot ubaldot commented Aug 26, 2024

It should close #38.
It also includes changes in #41

@mmrwoods
Copy link
Collaborator

@Donaldttt @ubaldot FWIW I also like this idea of allowing fuzzy to respect wildignore, though I think it should be an option, disabled by default, e.g. add this to plugin/fuzzyy.vim

g:fuzzyy_respect_wildignore = exists('g:fuzzyy_respect_wildignore') ? g:fuzzyy_respect_wildignore : 0
...

# Handle wildignore option
if g:fuzzyy_respect_wildignore
    var wildignore_dir = copy(split(&wildignore, ','))->filter('v:val =~ "\*$"')
    var wildignore_files = copy(split(&wildignore, ','))->filter('v:val !~ "\*$"')
    extend(g:fuzzyy_exclude_file, wildignore_files)
    extend(g:fuzzyy_exclude_dir, wildignore_dir)
endif

It would be also necessary to document how wildignore is parsed here, with anything missing a * considered a directory, and possibly restrict it further to ensure it just works everywhere (what about ** or ? in patterns for example?)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURES REQUEST]: take into account of wildignore option and filter FuzzyFiles results with readable.
2 participants