Following the approach used in other syntax definitions, add support for
defining the "syntax sync minlines=..." values for rst files in the 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>
---
Notes:
It seems that patches like this one should be submitted through the
respective GitHub project pages. Though, I'm unable to use GitHub,
so I'd appreciate if this patch could be picked up from the vim-dev
mailing list by the respective project maintainer.
runtime/syntax/rst.vim | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index a90c90be21a2..b4f50f36f4a3 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -3,7 +3,7 @@
" Maintainer: Marshall Ward <
marsha...@gmail.com>
" Previous Maintainer: Nikolai Weibull <
n...@bitwi.se>
" Website:
https://github.com/marshallward/vim-restructuredtext
-" Latest Revision: 2020-03-31
+" Latest Revision: 2025-03-06
if exists("b:current_syntax")
finish
@@ -246,8 +246,7 @@ endfor
" Enable top level spell checking
syntax spell toplevel
-" TODO: Use better syncing.
-syn sync minlines=50 linebreaks=2
+exe "syn sync minlines=" . get(g:, 'rst_minlines', 50) . " linebreaks=2"
hi def link rstTodo Todo
hi def link rstComment Comment