Skip to content

Instantly share code, notes, and snippets.

@liquidz
Last active Oct 15, 2019
Embed
What would you like to do?
" autoload/clap/provider/rg_root_files.vim
" nnoremap <C-p> :<C-u>Clap rg_root_files ++externalfilter=fzf +async<CR>
let s:save_cpo = &cpoptions
set cpoptions&vim
let s:rg_root_files = {
\ 'sink': 'e',
\ 'enable_rooter': v:true,
\ }
if executable('rg')
let s:rg_root_files.source = 'rg --files --hidden'
else
let s:rg_root_files.source = ['rg executable not found']
endif
let g:clap#provider#rg_root_files# = s:rg_root_files
let &cpoptions = s:save_cpo
unlet s:save_cpo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment