runtime(rst): Add support for rst_minlines

Commit: 
https://github.com/vim/vim/commit/310082f3cfab92a28a635b0dc2a972c7f1fa5b92
Author: Dragan Simic <[email protected]>
Date:   Mon Oct 13 18:25:57 2025 +0000

    runtime(rst): Add support for rst_minlines
    
    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.
    
    related: #18566
    
    Signed-off-by: Dragan Simic <[email protected]>
    Signed-off-by: Marshall Ward <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 21e0701b7..3651f1b09 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt*   For Vim version 9.1.  Last change: 2025 Oct 12
+*syntax.txt*   For Vim version 9.1.  Last change: 2025 Oct 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -3382,6 +3382,9 @@ To enable folding of sections: >
 
 Note that folding can cause performance issues on some platforms.
 
+The minimum line syntax sync is set to 50.  To modify this number: >
+       let rst_minlines = 100
+
 
 REXX                                           *rexx.vim* *ft-rexx-syntax*
 
diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index c43bda589..34e43932b 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -246,11 +246,11 @@ for s:filetype in keys(g:rst_syntax_code_list)
     unlet! prior_isk
 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1v8NXg-00CgoR-N1%40256bit.org.

Raspunde prin e-mail lui