Following the approach used in other syntax definitions, add support for
defining the "syntax sync minlines=..." values for kconfig files in users'
~/.vimrc files, to allow the users to adjust that value in case syntax
highlighting stops working for some of the files they edit.
Signed-off-by: Dragan Simic <
dsi...@manjaro.org>
---
runtime/syntax/kconfig.vim | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/runtime/syntax/kconfig.vim b/runtime/syntax/kconfig.vim
index 0aecc0006085..62e47471a554 100644
--- a/runtime/syntax/kconfig.vim
+++ b/runtime/syntax/kconfig.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Maintainer: Christian Brabandt <
c...@256bit.org>
" Previous Maintainer: Nikolai Weibull <
n...@bitwi.se>
-" Latest Revision: 2024-07-19
+" Latest Revision: 2025-01-19
" License: Vim (see :h license)
" Repository:
https://github.com/chrisbra/vim-kconfig
@@ -587,8 +587,6 @@ syn match kconfigConfOptExprGrpE ')'
\ kconfigConfOptExprOr
\ skipwhite skipnl
-syn sync minlines=50
-
hi def link kconfigTodo Todo
hi def link kconfigComment Comment
hi def link kconfigKeyword Keyword
@@ -715,6 +713,11 @@ syn region kconfigHelpText
\ skip='^$'
\ end='^\z1\@!'
+if !exists("kconfig_minlines")
+ let kconfig_minlines = 50
+endif
+exec "syn sync minlines=" . kconfig_minlines
+
hi def link kconfigTodo Todo
hi def link kconfigComment Comment
hi def link kconfigKeyword Keyword