Ultisnips: Conflict with coc.nvim tab action.

Created on 28 Jan 2019  路  3Comments  路  Source: SirVer/ultisnips


If you install coc.nvim plugin and enable it for auto-completion and after that install ultisnips, the tab does not work any more and you can not cycle through items from autocomplete list.
I use these settings for coc.nvim to cycle through items in autocomplete list:

" Use <Tab> and <S-Tab> for navigate completion list                            
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"                        
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"

Expected behavior:
Get back again to work with coc.nvim and choose items from list.

Actual behavior:
When you hit tab, it does not work and you can not cycle through items in autocomplete list.

Steps to reproduce

  1. Install coc.nvim plugin.
  2. enable these settings for it:
" Use <Tab> and <S-Tab> for navigate completion list                            
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"                        
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
  1. Install ultisnips plugin and don't use any configuration for it.

user question

Most helpful comment

For anyone that runs into this issue and is using coc.nvim and Ultisnips plugin (https://github.com/neoclide/coc-sources/tree/master/packages/ultisnips)

you can disable the default Ultisnips tab mapping to free up coc.nvim

let g:UltiSnipsExpandTrigger = "<nop>"

All 3 comments

Up.

It's not bug, ultisnips maps your <tab> by default.
You can configure it other key.

For anyone that runs into this issue and is using coc.nvim and Ultisnips plugin (https://github.com/neoclide/coc-sources/tree/master/packages/ultisnips)

you can disable the default Ultisnips tab mapping to free up coc.nvim

let g:UltiSnipsExpandTrigger = "<nop>"
Was this page helpful?
0 / 5 - 0 ratings