mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Allow highlighting surroundings always
This commit is contained in:
@@ -29,6 +29,7 @@ function! s:init_options()
|
||||
call s:init_option('matchup_matchparen_stopline', 400)
|
||||
call s:init_option('matchup_matchparen_pumvisible', 1)
|
||||
call s:init_option('matchup_matchparen_nomode', '')
|
||||
call s:init_option('matchup_matchparen_hi_surround_always', 0)
|
||||
|
||||
call s:init_option('matchup_matchparen_timeout',
|
||||
\ get(g:, 'matchparen_timeout', 300))
|
||||
|
||||
@@ -183,7 +183,8 @@ endif
|
||||
" }}}1
|
||||
|
||||
function! s:matchparen.highlight_deferred() abort dict " {{{1
|
||||
if !g:matchup_matchparen_deferred
|
||||
if !get(b:, 'matchup_matchparen_deferred',
|
||||
\ g:matchup_matchparen_deferred)
|
||||
return s:matchparen.highlight()
|
||||
endif
|
||||
|
||||
@@ -273,7 +274,15 @@ function! s:matchparen.highlight(...) abort dict " {{{1
|
||||
\ 'stopline': g:matchup_matchparen_stopline,
|
||||
\ 'highlighting': 1, })
|
||||
call matchup#perf#toc('matchparen.highlight', 'get_current')
|
||||
if empty(l:current) | return | endif
|
||||
if empty(l:current)
|
||||
if get(b:, 'matchup_matchparen_deferred',
|
||||
\ g:matchup_matchparen_deferred)
|
||||
\ && get(b:, 'matchup_matchparen_hi_surround_always',
|
||||
\ g:matchup_matchparen_hi_surround_always)
|
||||
call s:highlight_surrounding(l:insertmode)
|
||||
endif
|
||||
return
|
||||
endif
|
||||
|
||||
let l:corrlist = matchup#delim#get_matching(l:current,
|
||||
\ { 'stopline': g:matchup_matchparen_stopline,
|
||||
|
||||
Reference in New Issue
Block a user