Skip to content

Commit

Permalink
Add nvim version check for matchparen_deferred
Browse files Browse the repository at this point in the history
closes #22
  • Loading branch information
andymass committed Mar 4, 2018
1 parent f0b6e15 commit d647ae8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ let g:matchup_matchparen_deferred = 1
default: 0 (disabled)

Note: this feature is only available if your vim version has `timers` and
the function `timer_pause` (version 7.4.2180 and after).
the function `timer_pause`, version 7.4.2180 and after. For neovim, this
will only work in nvim-0.2.1 and after.

Adjust timeouts in milliseconds for deferred highlighting:
```vim
Expand Down
3 changes: 2 additions & 1 deletion autoload/matchup/matchparen.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ endfunction

function! matchup#matchparen#enable() " {{{1
if g:matchup_matchparen_deferred
\ && (!has('timers') || !exists('*timer_pause'))
\ && (!has('timers') || !exists('*timer_pause')
\ || has('nvim') && !has('nvim-0.2.1'))
let g:matchup_matchparen_deferred = 0
echohl WarningMsg
echom "match-up's deferred highlighting feature is "
Expand Down
3 changes: 2 additions & 1 deletion doc/matchup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ Module matchparen~
Default: 0 (disabled)

Note: this feature is only available if your vim version has |timers| and
the function |timer_pause| (version 7.4.2180 and after).
the function |timer_pause|, version 7.4.2180 and after. For neovim, this
will only work in nvim-0.2.1 and after.

*g:matchparen_matchparen_deferred_show_time*
*g:matchparen_matchparen_deferred_hide_time*
Expand Down

0 comments on commit d647ae8

Please sign in to comment.