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 request: Use ripgrep's globs #94

Open
atishay opened this issue May 17, 2020 · 3 comments
Open

Feature request: Use ripgrep's globs #94

atishay opened this issue May 17, 2020 · 3 comments

Comments

@atishay
Copy link

atishay commented May 17, 2020

With the -g option ripgrep can take a glob pattern which is much more powerful and faster than far.vim's glob matching. Is it acceptable if we have an option to disable far.vim's glob matching and use ripgrep's instead?

I am happy to help with a PR(might take some time, new to python and vimscript). Have a working brute force version that I can clean up if this is acceptable.

@ChristianChiarulli
Copy link
Contributor

I really like this since it leverages rg's ability to use the .gitignore file rather than having to specify a farignore file.

@CKolkey
Copy link
Contributor

CKolkey commented Sep 1, 2020

Seconded, thirded, fourthed. Been reading though the source code for this. Trying to search for a single word via :Farf in my modest rails app takes, and I'm not exaggerating, three minutes. And where is that three minutes spent? Globbing files and ignored files! This right here:

far_glob.py:66

files = {f for rule in rules for f in root.glob(rule) if pathlib.Path.is_file(f)}

Ho-lee-smokes. I've got the glob all of node_modules/ because I want to ignore it? I don't even know what to say. Ripgrep can perform the query on my app in under a second, using the built-in ignore. But this...this is something else!

Otherwise, real solid plugin.

@dylan-chong
Copy link

Should this be closed?

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

No branches or pull requests

4 participants