All Projects → antoinemadec → Coc Fzf

antoinemadec / Coc Fzf

fzf ❤️ coc.nvim

Projects that are alternatives of or similar to Coc Fzf

Nvim Lspfuzzy
A Neovim plugin to make the LSP client use FZF
Stars: ✭ 107 (-59%)
Mutual labels:  fzf, neovim-plugin
null-ls.nvim
Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
Stars: ✭ 965 (+269.73%)
Mutual labels:  neovim-plugin, lsp
nvim-config
My neovim config
Stars: ✭ 63 (-75.86%)
Mutual labels:  neovim-plugin, lsp
Lsp Status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
Stars: ✭ 201 (-22.99%)
Mutual labels:  lsp, neovim-plugin
fzf-lsp.nvim
Enable the power of fzf fuzzy search for the neovim built in lsp
Stars: ✭ 143 (-45.21%)
Mutual labels:  fzf, lsp
Coc.nvim
Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Stars: ✭ 18,268 (+6899.23%)
Mutual labels:  lsp, neovim-plugin
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+199.23%)
Mutual labels:  neovim-plugin, lsp
nvim-lsp-ts-utils
Utilities to improve the TypeScript development experience for Neovim's built-in LSP client.
Stars: ✭ 437 (+67.43%)
Mutual labels:  neovim-plugin, lsp
fm-nvim
🗂 Neovim plugin that lets you use your favorite terminal file managers (and fuzzy finders) from within Neovim.
Stars: ✭ 114 (-56.32%)
Mutual labels:  fzf, neovim-plugin
aerial.nvim
Neovim plugin for a code outline window
Stars: ✭ 485 (+85.82%)
Mutual labels:  neovim-plugin, lsp
Nvim Lsputils
Better defaults for nvim-lsp actions
Stars: ✭ 142 (-45.59%)
Mutual labels:  lsp, neovim-plugin
coc-tailwind-intellisense
Coc.nvim extension for Tailwind CSS IntelliSense
Stars: ✭ 117 (-55.17%)
Mutual labels:  neovim-plugin, lsp
Completor.vim
Async completion framework made ease.
Stars: ✭ 1,158 (+343.68%)
Mutual labels:  lsp, neovim-plugin
Fzf Mru.vim
Vim plugin that is using fzf.vim to display your most recently used files.
Stars: ✭ 79 (-69.73%)
Mutual labels:  fzf, neovim-plugin
fzf-checkout.vim
Manage branches and tags with fzf
Stars: ✭ 187 (-28.35%)
Mutual labels:  fzf, neovim-plugin
lsp signature.nvim
LSP signature hint as you type
Stars: ✭ 915 (+250.57%)
Mutual labels:  neovim-plugin, lsp
aurora
24-bit dark theme for (Neo)vim. Optimized for treesitter, LSP.
Stars: ✭ 141 (-45.98%)
Mutual labels:  neovim-plugin, lsp
cmp-under-comparator
nvim-cmp comparator function for completion items that start with one or more underlines
Stars: ✭ 77 (-70.5%)
Mutual labels:  neovim-plugin
LSP-Symbol-Outline
A tree like view for symbols in Emacs using the Language Server Protocol.
Stars: ✭ 37 (-85.82%)
Mutual labels:  lsp
denite-gtags
Denite source for GNU Global
Stars: ✭ 27 (-89.66%)
Mutual labels:  neovim-plugin

fzf ❤️ coc.nvim

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

Rationale

This plugin uses FZF fuzzy finder in place of Coc's built-in CocList sources as well as Coc's jumps (definition, reference etc).
It makes the interaction with Coc easier when you are used to FZF.

The main features are:

  • FZF preview
  • FZF bindings for splits and tabs
  • FZF layout (floating windows etc)
  • FZF multi-select to populate the quickfix window

It was inspired by Robert Buhren's functions and coc-denite.

Installation

Make sure to have the following plugins in your vimrc:

Plug 'junegunn/fzf', {'dir': '~/.fzf','do': './install --all'}
Plug 'junegunn/fzf.vim' " needed for previews
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
Plug 'antoinemadec/coc-fzf'

Or, if you prefer using the release branch:

Plug 'junegunn/fzf', {'dir': '~/.fzf','do': './install --all'}
Plug 'junegunn/fzf.vim' " needed for previews
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'antoinemadec/coc-fzf', {'branch': 'release'}

Also consider installing bat for colorful previews.

Commands

Command List
:CocFzfList List all list sources
:CocFzfList --original-only List only original sources
:CocFzfList {source} Run a list source
:CocFzfListResume Retrieve last list source

Original Sources

These are the list sources implemented with FZF:

Source List Preview Multi-select Vim support
actions Like :CocList actions - -
commands Like :CocList commands - -
diagnostics Like :CocList diagnostics
diagnostics --current-buf Like :CocList diagnostics in the current buffer only
issues Like :CocList issues. Requires coc-git -
location Like :CocList location. Requires fzf.vim
outline Like :CocList outline, with colors. Requires ctags -
output Like :CocList output -
services Like :CocList services - -
snippets Like :CocList snippets. Requires coc-snippets
sources Like :CocList sources - -
symbols ({query}) Like :CocList symbols
symbols --kind {kind} ({query}) Like :CocList symbols -kind {kind}
yank Like :CocList yank. Requires coc-yank

FZF bindings (default):

  • ctrl-t: open in tab
  • ctrl-x: open in vertical split
  • ctrl-s: open in horizontal split
  • tab: multi-select, populate quickfix window
  • ?: toggle preview window

Wrapper Sources

Not every list source is implementable with FZF.
For those sources, :CocFzfList acts as a wrapper calling :CocList

Wrapper Sources appear with the [wrapper] mention when running :CocFzfList

Add/Delete Sources

" add_list_source(name, description, command)
call coc_fzf#common#add_list_source('fzf-buffers', 'display open buffers', 'Buffers')

" delete_list_source(name)
call coc_fzf#common#delete_list_source('fzf-buffers')

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

" allow to scroll in the preview
set mouse=a

" mappings
nnoremap <silent> <space><space> :<C-u>CocFzfList<CR>
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>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 } }

Q: How to see references, definitions etc in a FZF window?
A: It is already supported by default, just make sure to have the default coc mappings:

nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)

Q: How to get colors in previews?
A: Install bat.

Q: CocFzf looks different from my other Fzf commands. How to make it the same?
A: By default, CocFzf tries to mimic CocList. Here is how to change this:

let g:coc_fzf_preview = ''
let g:coc_fzf_opts = []

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].