Skip to content

Commit

Permalink
Merge pull request #195 from vilari-mickopf/master
Browse files Browse the repository at this point in the history
Add option to change virt text markers
  • Loading branch information
andymass authored Nov 20, 2021
2 parents 50cadec + 67ef142 commit 15514aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions autoload/matchup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function! s:init_options()
call s:init_option('matchup_matchparen_nomode', '')
call s:init_option('matchup_matchparen_hi_surround_always', 0)
call s:init_option('matchup_matchparen_hi_background', 0)
call s:init_option('matchup_matchparen_start_sign', '')
call s:init_option('matchup_matchparen_end_sign', '')

call s:init_option('matchup_matchparen_timeout',
\ get(g:, 'matchparen_timeout', 300))
Expand Down
5 changes: 3 additions & 2 deletions autoload/matchup/matchparen.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ function! matchup#matchparen#status_str(offscreen, ...) abort " {{{1
if empty(a:offscreen.links.close.match)
let l:hi = s:wordish(a:offscreen.links.open)
\ ? 'MatchWord' : 'MatchParen'
let l:sl .= ' ' . '%#' . l:hi . '#'
let l:sl .= ' ' . g:matchup_matchparen_end_sign . ' %#' . l:hi . '#'
\ . a:offscreen.links.open.match . '%#Normal#'
endif

Expand Down Expand Up @@ -1090,7 +1090,8 @@ function! s:add_matches(corrlist, ...) " {{{1
\ bufnr('%'), 'disable_virtual_text')
call nvim_buf_set_extmark(0, s:ns_id,
\ l:corr.lnum - 1, l:corr.cnum - 1, {
\ 'virt_text': [['' . a:corrlist[0].match, l:group]],
\ 'virt_text': [[g:matchup_matchparen_end_sign . ' ' .
\ a:corrlist[0].match, l:group]],
\})
else
call nvim_buf_add_highlight(0, s:ns_id, l:group,
Expand Down
2 changes: 1 addition & 1 deletion autoload/matchup/where.vim
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ endfunction

function! s:arrow()
if empty(g:matchup_where_separator)
return ''
return g:matchup_matchparen_start_sign
endif
return g:matchup_where_separator
endfunction
Expand Down

0 comments on commit 15514aa

Please sign in to comment.