From d647ae8d2cb355a31d70ce68f6cda5e69f07d053 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sun, 4 Mar 2018 14:21:14 -0500 Subject: [PATCH] Add nvim version check for matchparen_deferred closes #22 --- README.md | 3 ++- autoload/matchup/matchparen.vim | 3 ++- doc/matchup.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 471a2ca..7938d84 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index dcca044..613673b 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -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 " diff --git a/doc/matchup.txt b/doc/matchup.txt index 862717a..3afb48a 100644 --- a/doc/matchup.txt +++ b/doc/matchup.txt @@ -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*