소스 검색

Use ripgrep if present

Thomas Dy 8 년 전
부모
커밋
6f6c0bebee
1개의 변경된 파일11개의 추가작업 그리고 2개의 파일을 삭제
  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 = ''