From 302473e30a086538cc7f6b100dc2f26ba2d81142 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sun, 19 Mar 2017 22:58:36 +0800 Subject: [PATCH] Update denite config --- config/plugins/denite.vim | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/config/plugins/denite.vim b/config/plugins/denite.vim index 65a3f3474..e45c2f2d2 100644 --- a/config/plugins/denite.vim +++ b/config/plugins/denite.vim @@ -1 +1,20 @@ -let g:denite_config_loaded = 1 +let s:sys = SpaceVim#api#import('system') +if !s:sys.isWindows + if executable('ag') + " Change file_rec command. + call denite#custom#var('file_rec', 'command', + \ ['ag', '--follow', '--nocolor', '--nogroup', '-g', '']) + elseif executable('rg') + " For ripgrep + " Note: It is slower than ag + call denite#custom#var('file_rec', 'command', + \ ['rg', '--files', '--glob', '!.git', '']) + endif +else + if executable('pt') + " For Pt(the platinum searcher) + " NOTE: It also supports windows. + call denite#custom#var('file_rec', 'command', + \ ['pt', '--follow', '--nocolor', '--nogroup', '-g:', '']) + endif +endif