neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit dbddd5989acf55a30d3ff8fa4243bf2560238ca3
parent 7455c5ce88c4c3ee7ddd3ea8975fafec310d5a9b
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue, 14 Oct 2025 10:42:03 +0800

vim-patch:310082f: 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: vim/vim#18566

https://github.com/vim/vim/commit/310082f3cfab92a28a635b0dc2a972c7f1fa5b92

Co-authored-by: Dragan Simic <dsimic@manjaro.org>

Diffstat:
Mruntime/doc/syntax.txt | 3+++
Mruntime/syntax/rst.vim | 4++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt @@ -2892,6 +2892,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 *ft-rexx-syntax* diff --git 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