mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Consider cmp in pumvisible
This commit is contained in:
@@ -331,7 +331,7 @@ function! s:matchparen.highlight(...) abort dict " {{{1
|
||||
|
||||
if has('vim_starting') | return | endif
|
||||
|
||||
if !g:matchup_matchparen_pumvisible && pumvisible() | return | endif
|
||||
if !g:matchup_matchparen_pumvisible && s:pumvisible() | return | endif
|
||||
|
||||
" try to avoid interfering with some auto-complete plugins
|
||||
if has('*state') && state('a') !=# '' | return | endif
|
||||
@@ -502,6 +502,18 @@ function s:matchparen.transmute_reset() abort dict
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
if has('nvim')
|
||||
function s:pumvisible() abort
|
||||
return pumvisible() || luaeval('pcall(require, "cmp")')
|
||||
\ && luaeval('require"cmp".visible()')
|
||||
endfunction
|
||||
else
|
||||
function s:pumvisible() abort
|
||||
return pumvisible()
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" }}}1
|
||||
|
||||
function! s:do_popup_autocmd_enter(win_context) abort "{{{1
|
||||
|
||||
Reference in New Issue
Block a user