coc-snippets
coc-snippets copied to clipboard
Compatibility issue with andymass/vim-matchup
https://github.com/andymass/vim-matchup is a popular vim plugin. However, the cursor doesn't behave as expected after expanding some snippets.
MWE
call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'}
Plug 'honza/vim-snippets'
Plug 'andymass/vim-matchup'
call plug#end()
set nocp
let g:tex_flavor = "latex"
let g:coc_global_extensions = [
\ 'coc-snippets',
\ ]
imap <C-l> <Plug>(coc-snippets-expand)
To reproduce
- vim t.tex
- type
beg<ctrl_l>
The snippet expands correctly, but the cursor doesn't locate at the expected position.
Expected (w/o vim-matchup)
|
denotes cursor position
\begin{|}
\end{}
Current (w/ vim-matchup)
\be|gin{}
\end{}
It's worth noting that https://github.com/SirVer/ultisnips works correctly with vim-matchup