Giter VIP home page Giter VIP logo

coc-fzf's Introduction

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. Requires pynvim
symbols --kind {kind} ({query}) Like :CocList symbols -kind {kind} Requires pynvim
yank Like :CocList yank. Requires coc-yank

FZF bindings (default):

  • ctrl-t: open in tab
  • ctrl-v: open in vertical split
  • ctrl-x: 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_fullscreen number Set to 1 to use FZF fullscreen mode in coc-references etc. 0
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']
g:coc_fzf_location_delay number Delay(ms) fzf_run() to solve weird race conditions. 0

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 = []

Q: CocFzf symbol search reports get_workspace_symbols.py could not be executed successfully A: You are most likely missing pynvim

License

MIT

coc-fzf's People

Contributors

antoinemadec avatar asermax avatar bratekarate avatar dundargoc avatar expipiplus1 avatar felippemr avatar frederick888 avatar gou4shi1 avatar jiz4oh avatar ozaq avatar sangdol avatar seiyeah78 avatar sethfowler avatar supersandro2000 avatar thisisrandy avatar yangchaoyi avatar yongjieyongjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coc-fzf's Issues

Show a message when trying to load an empty list

It would be nice to get some feedback when loading an empty list, to distinguish "no diagnostics" from "my plugins are broken and this keybinding isn't working"

I think a simple echo "no diagnostics" (swap "diagnostics" for whatever the list type is) should do.

Breaking changes

Hello.
I noticed that you just rollout some breaking changes. Basically my keymaps stopped working, not big deal, but took a bit to figure it out.
I don't have much experience with vim so, is there a mechanism to notify this breaking changes when you update? Do you plan to introduce more breaking changes?

thanks and regards

CocFzfList symbols not working

hello!

when running :CocFzfList symbols and start writing a query, I get the following error:

[Command failed: python3 /home/mpostma/.config/nvim/plugged/coc-fzf/script/get_workspace_symbols.py  /tmp/nvimUXWUTd/0 3 3 'f']

Any idea how to fix this ?

Ability to preview diagnostic messages themselves in diagnostic list

It would be nice to (in the presence of large, multi-line messages) be able to have a preview of the whole error message. A bonus would be to also display the diagnostic location in the file as is currently done.

I'm happy to be assigned this issue, although I can't promise when I'll get round to it.

yank: does not match CocList yank behavior

Two things:

  1. does not support block paste properly
  2. copies yank in buffer (CocList yank does not)

1- can be addressed with a tedious list of actions like: go 1 line down at the same col, insert next yank line etc. Don't forget to use keepjumps

2- can be addressed with nvim_paste()

Error on request (listDescriptions): Vim(return):Error invoking 'listDescriptions' on channel 3 (coc)

Environment

  • echo $FZF_DEFAULT_OPTS: --layout=reverse --info=inline
  • bat --version: bat 0.15.4
  • Are your vim plugins up-to-date?: yes
  • (n)vim --version:
NVIM v0.5.0-634-g161cdba1e

Describe the Bug

Error on request (listDescriptions): Vim(return):Error invoking 'listDescriptions' on channel 3 (coc):
action "listDescriptions" not registered
Error detected while processing function coc_fzf#lists#fzf_run[1]..coc_fzf#common#get_list_sources:
line    1:
E712: Argument of map() must be a List or Dictionary
E712: Argument of extend() must be a List or Dictionary

image

To Reproduce

Minimal vimrc

" minimal vimrc
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'junegunn/fzf.vim'
\ | Plug 'junegunn/fzf', { 'do': {-> fzf#install()} }
\ | Plug 'tpope/vim-fugitive'
\ | Plug 'antoinemadec/coc-fzf'

if g:HasPlug('coc-fzf')
    nnoremap <silent> <space>A  :<C-u>CocFzfList diagnostics<CR>
    nnoremap <silent> <space>a  :<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<CR>
    " nnoremap <silent> <space>l  :<C-u>CocFzfList location<CR>
    nnoremap <silent> <space>o  :<C-u>CocFzfList outline<CR>
    nnoremap <silent> <space>O  :<C-u>CocFzfList symbols<CR>
    nnoremap <silent> <space>s  :<C-u>CocFzfList services<CR>
    nnoremap <silent> <space>p  :<C-u>CocFzfListResume<CR>
endif

Steps to Reproduce

  1. nvim -u minimal_vimrc
  2. :e myfile.py
  3. etc

Expected Behavior

A clear and concise description of what you expected to happen.

Plugin should use python interpreter set on nvim(python3_host_prog)

First, thanks for this!

I installed the plugin but it seems to be using the python interpreter for the current virtualenv I am in as opposed to using the python interpreter I set on python3_host_prog(on neovim).

I installed the python neovim module on the interpreter set by python3_host_prog.

Also checked get_workspace_symbols and saw #!/usr/bin/env python3.

Suport for CocAction ?

Would it make sense to support a way to search through all coc actions / commands you can do with coc?

CocFzfList symbols notworking

Hi @antoinemadec
when i run command :CocFzfList symbols i got error

image

/Users/samhv/.config/nvim/plugged/coc-fzf/script/get_workspace_symbols.py /var/folders/7p/xqgf0dgs61q2c7g61bs3dc500000gn/T/nvimW3zUBj/0 3 4 'a'
Traceback (most recent call last):
  File "/Users/samhv/.config/nvim/plugged/coc-fzf/script/get_workspace_symbols.py", line 52, in <module>
    'getWorkspaceSymbols', args.query, int(args.bufnr))
  File "/Users/samhv/Library/Python/3.7/lib/python/site-packages/pynvim/api/nvim.py", line 299, in call
    return self.request('nvim_call_function', name, args, **kwargs)
  File "/Users/samhv/Library/Python/3.7/lib/python/site-packages/pynvim/api/nvim.py", line 182, in request
    res = self._session.request(name, *args, **kwargs)
  File "/Users/samhv/Library/Python/3.7/lib/python/site-packages/pynvim/msgpack_rpc/session.py", line 104, in request
    raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim:Error invoking 'CocAction' on channel 3 (coc):
Method "CocAction" not exists with coc.nvim

For Version

vim version: NVIM v0.4.3
node version: v14.2.0
coc.nvim version: 0.0.78
term: iTerm.app
platform: darwin
Python version: 3.7.7
pynvim version: 0.4.1

please help :(

Color is wrong?

Screenshot 2020-07-27 at 16 38 03
Hello, first thank you for the plugin.
The above is the current color of my Coc-Fzf list, there is no distinction between the first word and the rest. All words has the color of the code comments.

Does anyone know a possible reason for this and a quick fix? Thanks in advance.

list index out of range error on exit

I hit the following error when exiting CocFzfList commands as well as some other sources, but not all:\

Error detected while processing function coc_fzf#lists#fzf_run[10]..coc_fzf#commands#fzf_run[11]..fzf#run[63]..<SNR>18_callback:
line   21:
Vim(let):E684: list index out of range: 0
Error detected while processing function coc_fzf#lists#fzf_run[10]..coc_fzf#commands#fzf_run:
line   11:
E171: Missing :endif
Error detected while processing function coc_fzf#lists#fzf_run:
line   10:
E171: Missing :endif

MWE vimrc:

call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/fzf', {'dir': '~/.fzf','do': './install --all'}
Plug 'junegunn/fzf.vim' " needed for previews
Plug 'antoinemadec/coc-fzf'
call plug#end()
nnoremap <silent> <space>c       :<C-u>CocFzfList commands<CR>

Steps to repro:

  1. launch vim
  2. Press space and c to open commands list, no errors observed so far
  3. Press esc to exit, the error above shows up

Vim version:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 21 2020 16:11:23)
Included patches: 1-814
Compiled by Arch Linux
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       +tcl/dyn
-autoservername    +folding           +multi_byte        +termguicolors
+balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
+browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl/dyn          +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           +python/dyn        +visual
+conceal           +linebreak         +python3/dyn       +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua/dyn           +ruby/dyn          +wildmenu
+dialog_con_gui    +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       +X11
+dnd               +mouse             +sound             -xfontset
-ebcdic            +mouseshape        +spell             +xim
+emacs_tags        +mouse_dec         +startuptime       -xpm
+eval              +mouse_gpm         +statusline        +xsmp_interact
+ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread    -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_REENTRANT  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.32/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lelf    -lcanberra  -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.32/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.32/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

"CocFzfList symbols" takes you to the end of a function's body, not the beginning

This is a great plugin! I've hit one snag: if I run CocList -I symbols and select a function, I'm taken to the beginning of the function definition, which is where I want to go. CocFzfList symbols takes me to the end of the function body instead. This seems like a bug, although maybe there's just a configuration option I don't know about. I'm testing with TypeScript code using coc-tsserver, in case that's helpful.

Help with CocFzfList symbols

Is there a way to run :CocFzfList symbols over the current word my cursor is on? If there was functionality to do something like CocFzfList symbols {mySymbol} I could use expand('cword'). But it looks like I have to enter the floating modal first via :CocFzfList symbols then type the name of the symbol I'm searching.

An additional position appears in the jump list when using coc-reference

Environment

  • echo $FZF_DEFAULT_OPTS:
(nothing)
  • bat --version:
bat 0.15.4
  • Are your vim plugins up-to-date?:
yes
  • (n)vim --version:
(n)vim --version output
NVIM v0.4.4
Build type: Release
LuaJIT 2.0.5

Describe the Bug

An additional position appears in the jump list when use coc-reference.
When i use coc-reference(gr), i select an item from the float window that pops up and jump to the reference position.
The beginning of the referenced file appears in the jump list and i can't go back via once CTRL-O.
This is the screeshot:

coc-fzf

When i disable coc-fzf, no additional position apperas. And the screenshot(also expected) is:

nococ-fzf

To Reproduce

Minimal vimrc

" minimal vimrc
set nocompatible
filetype plugin indent on
syntax on
set hidden

call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
Plug '~/.fzf'
Plug 'junegunn/fzf.vim'
Plug 'antoinemadec/coc-fzf'
call plug#end()

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

Steps to Reproduce

Premise

  1. More than one reference so that fzf list will pop.
  2. Jump from one file to anther file.

Expected Behavior

No additional position in jump list and i could jump back via once CTRL-O.

Thanks in advance.

Some lists are missing in CocFzfList

Present in CocList but not in CocFzfList are:

  • output: output channels of coc.nvim
  • sources: registered completion sources
  • links: links of current buffer

Use :CocFzfList {source} instead of :CocFzfListSource

Hi,

  • :CocFzfListCommands are a counterpart of :CocList commands and
  • :CocFzfListDiagnostics are of :CocList diagnostics, etc.

I personally these command names are quite verbose and cannot type them easily. Why not :CocFzf {commands, diagnostics}, etc.? One can use their own command aliases or mappings, but wanted to see if it is something you may want to support officially.

Issue with neoterm

For some reason coc-fzf#common#fzf_selector_save sometimes is being called when I am in neoterm. I don't understand why but it only happens sometimes and only stops after I restart neovim.

Screen Shot 2020-04-27 at 12 17 22 PM

The only key that errors is the <CR>, enter in my case.

Can't use CocFzfList as command because it is ambiguos

Hello,
Thanks for this plugin. It is a life saver.
My normal use case would be to just trigger the main list, and navigate from there. However, the base command CocFzfList is ambiguous because it's name is a substring of all the others. Would it be possible to rename it so this is not the case?
Thanks!

yank: add block/line/char info

Hi @asermax ,

Could you please also add the block/line/char info in CocFzfList yank in order to match CocList yank?

You can get the info from the yank file:

  • |V| is line
  • |v| is char
  • |^v| is block

Do not hesitate to ask me any question 😃

Thanks,
Antoine

The preview window does not appear for "CocFzfList diagnostics"

I'm not getting a preview window when I run CocFzfList diagnostics. Hitting "?" just types a "?" normally into the fuzzy finder; it doesn't make a preview window appear.

I have junegunn/fzf.vim installed, and I do get a preview window when I use its commands, so I don't think I have any kind of global FZF configuration that's disabling it.

fork/exec...invalid argument in preview window in diagnostic list

When I use the preview window in the diagnostic window I just see the error message

fork/exec /nix/store/jirzjbbpl4j2kl2f01cfnrralxr5aw7a-bash-interactive-4.4-p23/bin/bash: invalid argument

There are a couple of messages but no smoking gun

"term://.//27510:( /nix/store/47xbab83hlcgslkxd3scmfvvj4axfsw7-vimplugin-coc-fzf-2020-03-06/share/vim-plugins/coc-fzf/script/get_lists.sh )|'fzf'  '--multi' '--expect=ctrl-v,ctrl-x,ctrl-t' '--ansi' '--prompt=Coc Lists> ' '--layout=reve
rse-list' --no-height > /run/user/1000/nvimaRXPaQ/5;#FZF" line 25 of 25 --100%-- col 14
"term://.//27546:cat '/run/user/1000/nvimaRXPaQ/7'|'fzf'  '--multi' '--expect=ctrl-v,ctrl-x,ctrl-t' '--ansi' '--prompt=Coc Diagnostics> ' '--layout=reverse-list' '--preview-window' 'up:50%' '--preview' ''\''/nix/store/x4dq0vy0mcfqrnhx2
pn48411k5bk67py-vimplugin-fzf-vim-2020-01-14/share/vim-plugins/fzf-vim/bin/preview.sh'\'' {}' '--bind' '?:toggle-preview' --no-height > /run/user/1000/nvimaRXPaQ/6;#FZF" line 25 of 25 --100%-- col 1

I am using the latest coc-fzf and fzf-vim

[Feature Request] CocList support

Hello, your plugin is great, I like it very much. I have a new feature request, Is it possible to add CocList function, thank you.

Extension list actions (enable, disable, etc)?

Describe the solution you'd like
Sorry if this has already been implemented. CocList extensions allows performing different actions on extensions. At the time of writing there are toggle, configure, open, disable, enable, lock, readme, reload, fix and uninstall. Is it possible to have these functions in coc-fzf as well? Currently it seems that coc-fzf is only able to toggle the selected extension if it's enabled.

Describe alternatives you've considered
Use CocList.

Unable to open any CocFzfList

Environment

  • echo $FZF_DEFAULT_OPTS:
  • bat --version: 0.15.4
  • Are your vim plugins up-to-date?:
  • (n)vim --version:
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/config -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-85913-1wbgqz6/neovim-0.4.3/build/include
Compiled by [email protected]

Features: +acl +iconv +tui

Describe the Bug

When I try to open any CocFzfList, I get the following error:

image

It used to work previously but I'm not sure when it stopped working.

To Reproduce

Minimal vimrc

call plug#begin('~/.vim/plugins')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'}
Plug 'junegunn/fzf.vim'
Plug 'antoinemadec/coc-fzf', {'do': 'yarn install --frozen-lockfile && yarn run build'}
call plug#end()

nnoremap <silent><nowait> <space>c :<C-u>CocFzfList commands<cr>

Steps to Reproduce

  1. nvim -u minimal_vimrc
  2. space+c

Expected Behavior

The list of commands appearing in a FZF list.

I'd like to refer to the coc-fzf implementation

I'm a developer of fzf-preview.vim.
I've recently been working on coc extensions as coc-fzf-preview.
I'm implementing Diagnostics and References for coc, can I refer to the coc-fzf syntax highlight?

If it's OK, I'd like to implement it and then link to the README.

Vim issues

This plugin does have issues with Vim:

  1. no highlighting in Fzf window
  2. no highlighting in destination file when using gr (needs to do :e to re-trigger highlights)
  3. bug with floating window + gr where the floating window seems to be empty and then opens in a tab

Some of those issues might be related to other plugin (fzf, fzf.vim or coc.nvim).
For now, the easy fix is to use Neovim instead of Vim 😄

Go to definition doesn't open in floating window

Environment

Newest nightly nvim, fzf, coc. Newest bat.
Arch linux, alacritty.

Describe the Bug

When calling coc-definition, e.g. through the example binding gd, the definition is not brought up in a floating window and instead jumps to the definition file like usual.

This doesn't occur with any other option, e.g. coc-references.

Initially display list in MRU order

... or at least with the last used element at the top.

CocList seems to do this, keeping the previously selected element under the cursor when opening a list again, it's quite handy.

Support Preview for diagnostic list

The preview for the locations list is awesome, it would be super if one could toggle a preview for diagnostic messages too. I had in mind the preview showing the full diagnostic message with line breaks and all, but I suppose also previewing the location would be nice to have too.

Filenames are sometimes missing in the diagnostic window

First of all, thanks for this super plugin, it was easy to set up and overall makes me very happy~

As a consequence of this it is not possible to navigate to the location of these diagnostic messages

Opening the file which contains the diagnostic via CocList seems to make the filenames appear subsequently in CocFzfList

I'm happy to debug this a little if told where to start.

Below are two screenshots demonstrating the differing output of CocList and CocFzfList.

CocList diagnostics:
image

FzfCocList diagnostics:
image

Using :CocFzfList outline doesn't store jumps

Hello! First, thanks for this package, is awesome

When using CocFzfList outline and going to a definition, I can jump back but not forward, I think when going to the definition the jumps is not stored?

I tested with CocList outline and the behaviour is correct, jumping back and forth after selecting an option

EDIT: I wanted to take a GIF for demonstration and did :clearjumps and while I was testing, I saw that there are no jumps being stored, so can't go back or forward, which is not the case for just using :CocList outline

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.