|
@@ -56,8 +56,17 @@ let g:jsx_ext_required = 0
|
|
|
|
|
|
let g:unite_enable_auto_select = 0
|
|
|
|
|
|
-" use ag if present
|
|
|
-if executable('ag')
|
|
|
+" use rg or ag if present
|
|
|
+if executable('rg')
|
|
|
+ let g:unite_source_rec_async_command =
|
|
|
+ \ ['rg', '--follow', '--hidden', '--files']
|
|
|
+ let g:unite_source_grep_command = 'ag'
|
|
|
+ let g:unite_source_grep_default_opts = '-i --vimgrep --hidden'
|
|
|
+ let g:unite_source_grep_recursive_opt = ''
|
|
|
+elseif executable('ag')
|
|
|
+ let g:unite_source_rec_async_command =
|
|
|
+ \ ['ag', '--follow', '--nocolor', '--nogroup',
|
|
|
+ \ '--hidden', '-g', '']
|
|
|
let g:unite_source_grep_command = 'ag'
|
|
|
let g:unite_source_grep_default_opts = '-i --vimgrep --hidden'
|
|
|
let g:unite_source_grep_recursive_opt = ''
|