roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

how to directly autocompletion when I typed <cr> #209

Open werckdd opened 6 years ago

werckdd commented 6 years ago

How to directly autocompletion when I typed <cr>? when i typed <cr> ,the annoying messages below just showed.I can't get the expand expression until i typed 1. I don't konw if it could be fix by plugin ultisnips or nvim-completion-manager.

2

here is my nvim configure

" fzf.vim and ultisnips-------------------------------------------------------------------{{{

  set rtp+=/usr/local/opt/fzf

  " ultisnips
    let g:UltiSnipsSnippetDirectories = ['/Users/qj/.config/nvim/UltiSnips']
  " set rtp+=/Users/qj/.config/nvim/ultisnips
  " Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
    let g:UltiSnipsExpandTrigger = '<C-j>'
    let g:UltiSnipsJumpForwardTrigger = '<C-f>'
    let g:UltiSnipsJumpBackwardTrigger = '<C-b>'
    " let g:UltiSnipsListSnippets="<c-s-j>"
    " If you want :UltiSnipsEdit to split your window.
    let g:UltiSnipsEditSplit="vertical"
"}}} 

" nvim-completion-manager------------------------------------------------------------------{{{

  imap <expr> <CR>  (pumvisible() ?  "\<c-y>\<Plug>(expand_or_nl)" : "<Plug>delimitMateCR")
    imap <expr> <Plug>(expand_or_nl) (cm#completed_is_snippet() ? "\<C-j>":"\<CR>")
    inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
    inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

"}}}
Shougo commented 6 years ago

It is UltiSnips feature. Not nvim-completion-manager issue.