From 48da6ff1efe8227cb4a01df8466e14f37ac13f7c Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Mon, 16 Apr 2018 09:21:25 -0700 Subject: [PATCH] Better denite grep --- neovim/init.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/neovim/init.vim b/neovim/init.vim index 95a47ea..c2c14f9 100644 --- a/neovim/init.vim +++ b/neovim/init.vim @@ -104,9 +104,14 @@ map ;x :x set wildignore+=*.swp,*~ +map ;b :Denite buffer + +map ;f :Denite file_rec call denite#custom#var('file_rec', 'command', \ ['rg', '--files', '--hidden'], \) + +map ;g :Denite grep call denite#custom#var('grep', 'command', ['rg']) call denite#custom#var('grep', 'default_opts', \ ['--vimgrep', '--no-heading', '--smart-case', '--hidden']) @@ -114,16 +119,13 @@ call denite#custom#var('grep', 'recursive_opts', []) call denite#custom#var('grep', 'pattern_opt', ['--regexp']) call denite#custom#var('grep', 'separator', ['--']) call denite#custom#var('grep', 'final_opts', []) +call denite#custom#source('grep', 'converters', ['converter_abbr_word']) call denite#custom#option("_", { \ "highlight_matched_char": "DeniteMatched", \ "highlight_matched_range": "None", \}) -map ;b :Denite buffer -map ;f :Denite file_rec -map ;g :Denite grep - let g:deoplete#enable_at_startup = 1 let g:deoplete#disable_auto_complete = 1 inoremap deoplete#mappings#manual_complete()