Bläddra i källkod

Use ripgrep if present

Thomas Dy 8 år sedan
förälder
incheckning
6f6c0bebee
1 ändrade filer med 11 tillägg och 2 borttagningar
  1. 11 2
      .vimrc

+ 11 - 2
.vimrc

@@ -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 = ''