jremmen / vim-ripgrep

Use RipGrep in Vim and display results in a quickfix list
MIT License
541 stars 99 forks source link

questions regarding rg_root_types #23

Open grolongo opened 6 years ago

grolongo commented 6 years ago

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'].

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

n00bmind commented 6 years ago

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