runtime(rst): Enable spell checking for more syntax constructs
Commit:
https://github.com/vim/vim/commit/a70f3467069eaf40a037ad74aa4f1ccb44565271
Author: Kirk Roemer <[email protected]>
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 <[email protected]>
Signed-off-by: Marshall Ward <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
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 .
--
--
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/E1v8NXl-00Cgqt-4P%40256bit.org.