Commit: runtime(rst): Enable spell checking for more syntax constructs

0 views
Skip to first unread message

Christian Brabandt

unread,
2:45 PM (8 hours ago) 2:45 PM
to vim...@googlegroups.com
runtime(rst): Enable spell checking for more syntax constructs

Commit: https://github.com/vim/vim/commit/a70f3467069eaf40a037ad74aa4f1ccb44565271
Author: Kirk Roemer <91125534+k...@users.noreply.github.com>
Date: Mon Oct 13 18:32:57 2025 +0000

runtime(rst): Enable spell checking for more syntax constructs

Enable spell checking for more recognised constructs:

* comments
* footnotes
* citations
* directives
* inline markup (*text*, **text**, ...)

related: #18566

Signed-off-by: Kirk Roemer <91125534+k...@users.noreply.github.com>
Signed-off-by: Marshall Ward <marsha...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim
index 9fab02839..bb9a0b3a4 100644
--- a/runtime/syntax/rst.vim
+++ b/runtime/syntax/rst.vim
@@ -78,7 +78,7 @@ execute 'syn region rstCitation contained matchgroup=rstDirective' .
execute 'syn region rstFootnote contained matchgroup=rstDirective' .
\ ' start=+\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]\_s+' .
\ ' skip=+^$+' .
- \ ' end=+^\s\@!+ contains=@rstCruft,@NoSpell'
+ \ ' end=+^\s\@!+ contains=@Spell,@rstCruft'

syn region rstHyperlinkTarget contained matchgroup=rstDirective
\ start='_\%(_\|[^:\]*\%(\.[^:\]*\)*\):\_s' skip=+^$+ end=+^\s\@!+
@@ -92,7 +92,7 @@ syn region rstHyperlinkTarget matchgroup=rstDirective
execute 'syn region rstExDirective contained matchgroup=rstDirective' .
\ ' start=+' . s:ReferenceName . '::\_s+' .
\ ' skip=+^$+' .
- \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock,rstExplicitMarkup'
+ \ ' end=+^\s\@!+ contains=@Spell,@rstCruft,rstLiteralBlock,rstExplicitMarkup'

execute 'syn match rstSubstitutionDefinition contained' .
\ ' /|.*|\_s\+/ nextgroup=@rstDirectives'
@@ -106,10 +106,10 @@ function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_righ
endif

if a:start != '``'
- let rst_contains=' contains=rstEscape' . a:name
+ let rst_contains=' contains=@Spell,rstEscape' . a:name
execute 'syn match rstEscape'.a:name.' +\\\|\'.first.'+'.' contained'
else
- let rst_contains=''
+ let rst_contains=' contains=@Spell'
endif

execute 'syn region rst' . a:name .
Reply all
Reply to author
Forward
0 new messages