ncm-R icon indicating copy to clipboard operation
ncm-R copied to clipboard

Can't get Parenthesis to work

Open gowachin opened this issue 5 years ago • 1 comments

I've just installed all the pluggins and they works just fine. However, the completion just add the words but no parenthesis at the end of a function for example.

Here is the .vimrc and I use vim not neovim

call plug#begin('~/.vim/plugged')

Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'

Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
Plug 'jalvesaq/Nvim-R'
Plug 'gaalcaras/ncm-R'

    " enable ncm2 for all buffers
    autocmd BufEnter * call ncm2#enable_for_buffer()

    " IMPORTANT: :help Ncm2PopupOpen for more information
    set completeopt=noinsert,menuone,noselect

    " NOTE: you need to install completion sources to get completions. Check
    " our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki
    Plug 'ncm2/ncm2-bufword'
    Plug 'ncm2/ncm2-path'

" Vim 8 only
if !has('nvim')
    Plug 'roxma/vim-hug-neovim-rpc'
endif

" Optional: for snippet support
Plug 'sirver/ultiSnips'
Plug 'ncm2/ncm2-ultisnips'

" Optional: better Rnoweb support (LaTeX completion)
Plug 'lervag/vimtex'

" List ends here. Plugins become visible to Vim after this call.
call plug#end()

I don't understand if this minimal issue comes from ncm-R or ncm2...

writing this, display image but after i play enter, i have this : image

Thanks for taking a look at this.

Gowa (Salut de Grenoble au passage ;) )

PS: I don't use VIM since a month, I may have done something wrong

gowachin avatar Dec 26 '19 02:12 gowachin

It seems to work when I add this at the end of the vimrc file, but I don't quite understand how. The issue was because I didn't mapped the snippset keys?

" Press enter key to trigger snippet expansion
" The parameters are the same as `:help feedkeys()`
inoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')

" c-j c-k for moving in snippet
" let g:UltiSnipsExpandTrigger		= "<Plug>(ultisnips_expand)"
let g:UltiSnipsJumpForwardTrigger	= "<c-j>"
let g:UltiSnipsJumpBackwardTrigger	= "<c-k>"
let g:UltiSnipsRemoveSelectModeMappings = 0

gowachin avatar Dec 27 '19 20:12 gowachin