Skip to content

felippemr/coc-fzf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fzf ❤️ coc.nvim

Use fzf instead of coc.nvim built-in fuzzy finder.

Rationale

❗coc-fzf only supports nvim❗, PR are welcome if you want to change this.

Inspired by Robert Buhren's functions and coc-denite this plugin aims to use fzf for CocList sources when possible. The goal is to keep the coc.nvim style and leverage your FZF Vim integration, such as layout, shortcuts, options etc.

Commands

Command List
:CocFzfList Equivalent to :CocList
:CocFzfList actions Equivalent to :CocList actions
:CocFzfList commands Equivalent to :CocList commands
:CocFzfList diagnostics Equivalent to :CocList diagnostics. Toggle preview: '?'
:CocFzfList diagnostics --current-buf Equivalent to :CocList diagnostics in the current buffer only
:CocFzfList extensions Equivalent to :CocList extensions
:CocFzfList location Equivalent to :CocList location. Toggle preview: '?'. Requires fzf.vim
:CocFzfList outline Equivalent to :CocList outline, with colors. Requires ctags
:CocFzfList symbols Equivalent to :CocList symbols
:CocFzfList symbols --kind {kind} Equivalent to :CocList symbols -kind {kind}
:CocFzfList services Equivalent to :CocList services
:CocFzfListResume Equivalent to :CocListResume

Options

Option Type Description Default value
g:coc_fzf_preview_toggle_key string Change the key to toggle the preview window '?'
g:coc_fzf_preview string Change the preview window position 'up:50%'
g:coc_fzf_opts array Pass additional parameters to fzf, e.g. ['--layout=reverse'] ['--layout=reverse-list']

Vimrc Example

nnoremap <silent> <space>a  :<C-u>CocFzfList diagnostics<CR>
nnoremap <silent> <space>b  :<C-u>CocFzfList diagnostics --current-buf<CR>
nnoremap <silent> <space>c  :<C-u>CocFzfList commands<CR>
nnoremap <silent> <space>e  :<C-u>CocFzfList extensions<CR>
nnoremap <silent> <space>l  :<C-u>CocFzfList location<CR>
nnoremap <silent> <space>o  :<C-u>CocFzfList outline<CR>
nnoremap <silent> <space>s  :<C-u>CocFzfList symbols<CR>
nnoremap <silent> <space>S  :<C-u>CocFzfList services<CR>
nnoremap <silent> <space>p  :<C-u>CocFzfListResume<CR>

FAQ

Q: How to get the FZF floating window? A: You can look at FZF Vim integration:

let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }

License

MIT

About

fzf ❤️ coc.nvim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 91.5%
  • Python 5.3%
  • Shell 3.2%