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

questions regarding rg_root_types #23

Open
grolongo opened this issue May 8, 2018 · 1 comment
Open

questions regarding rg_root_types #23

grolongo opened this issue May 8, 2018 · 1 comment

Comments

@grolongo
Copy link

grolongo commented May 8, 2018

Hello, there is no wiki/man and I'm trying to figure out what the setting rg_root_type does since the name isn't self-describing.

The description says "list of files/dir found in project root" with default being ['.git'].

  • "list of files/dir found"?
    so I guess if it finds a .git folder in my "project root" it ignores it?
    I'm already using --glob "!.git" in g:rg_command. I removed it to test and it doesn't seem to ignore any .git folder so I don't know what it does.

  • what does "project root" mean?
    is it the current working directory of the current buffer or something else?

If someone could enlighten me that would be cool. Thanks!

@n00bmind
Copy link

n00bmind commented Jun 4, 2018

Hi.
It's the same behaviour ripgrep has, have a look at its documentation.
It basically is a way to give the tool a "project" context. ripgrep will search all directories upwards of where the currently edited file is, and when it finds a file/folder that matches one of the patters specified there, it will set that directory as the project root. Then it will perform your search on all the files that are contained within that root, no matter where your currently edited file is or what's your current working directory in vim.
Remember to also enable the 'g:rg_derive_root' setting if you wanna try the feature.

Cheers

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

2 participants