Closed tracyone closed 5 years ago
Preview requires info
field of the :help complete-items
.
You could test it with the folloing keys in insert mode:
<c-r>=complete(1, [{'word': 'foo', 'info': 'this goes to the preview window'}])?'':''<cr>
<c-n>
minimal vimrc:
execute 'source ' . $WORKSPACE_DIR . '/plug.vim'
call plug#begin($WORKSPACE_DIR)
Plug 'morhetz/gruvbox'
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
Plug 'ncm2/ncm2-jedi'
Plug 'ncm2/float-preview.nvim'
call plug#end()
set completeopt=noinsert,menuone,noselect
set shortmess+=c
set noshowmode
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <CR> (pumvisible() ? "\<c-y>\<cr>" : "\<CR>")
au BufEnter * call ncm2#enable_for_buffer()
set pumheight=5
colorscheme gruvbox
nvim v0.3.7
I'm getting following error with a config above
Error detected while processing ~/.vim/plugged/float-preview.nvim/plugin/float_preview.vim: line 14: E216: No such group or event: CompleteChanged * call float_preview#_menu_popup_changed()
@mrded Are you shure your NeoVim version supports floating windows?
That's right, it didn't support it, I start using 0.4
version, it kinda works now.
0.4
is due end of august, then it should work properly.
Following is my setup of ncm2 and I am sure about that my neovim support floating window.
https://github.com/tracyone/vinux/blob/master/rc/ncm2.vim#L49-L75