Allow different highlighting at cursor

(related #30)
This commit is contained in:
Andy K. Massimino
2018-05-12 09:03:45 -04:00
parent 3ea94c2329
commit 6861eddfc9
2 changed files with 6 additions and 2 deletions

View File

@@ -319,8 +319,10 @@ function! s:matchparen.highlight(...) abort dict " {{{1
endif
for l:corr in l:corrlist
call add(w:matchup_match_id_list, matchaddpos('MatchParen',
\ [[l:corr.lnum, l:corr.cnum, strlen(l:corr.match)]]))
let l:group = l:corr.match_index == l:current.match_index
\ ? 'MatchParenCur' : 'MatchParen'
call add(w:matchup_match_id_list, matchaddpos(l:group,
\ [[l:corr.lnum, l:corr.cnum, strlen(l:corr.match)]]))
endfor
call matchup#perf#toc('matchparen.highlight', 'end')

View File

@@ -43,6 +43,8 @@ endtry
command! NoMatchParen call matchup#matchparen#toggle(0)
command! DoMatchParen call matchup#matchparen#toggle(1)
hi def link MatchParenCur MatchParen
if get(g:, 'matchup_override_vimtex', 0)
let g:vimtex_matchparen_enabled = 0
endif