runtime(json5): Add TODO support to syntax script (#13743)

Commit: 
https://github.com/vim/vim/commit/cc944b1452547145cdd947a37c75fce695d8571e
Author: Danek Duvall <[email protected]>
Date:   Thu Dec 21 07:44:19 2023 -0800

    runtime(json5): Add TODO support to syntax script 
(https://github.com/vim/vim/issues/13743)
    
    
    Signed-off-by: Danek Duvall <[email protected]>
    Signed-off-by: Mazunki Hoksaas <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/json5.vim b/runtime/syntax/json5.vim
index 5b01d33aa..dc0d11b2a 100644
--- a/runtime/syntax/json5.vim
+++ b/runtime/syntax/json5.vim
@@ -49,9 +49,11 @@ syn match   json5Key /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ 
contains=@Spell
 syn match   json5Key /"\([^"]\|\"\)\{-}"\ze\s*:/ contains=json5Escape,@Spell
 
 " Comment
-syn region  json5LineComment    start=+\/\/+ end=+$+ keepend contains=@Spell
-syn region  json5LineComment    start=+^\s*\/\/+ skip=+
\s*\/\/+ end=+$+ keepend fold contains=@Spell
-syn region  json5Comment        start="/\*"  end="\*/" fold contains=@Spell
+syn region  json5LineComment    start=+\/\/+ end=+$+ keepend 
contains=@Spell,json5Todo
+syn region  json5LineComment    start=+^\s*\/\/+ skip=+
\s*\/\/+ end=+$+ keepend fold contains=@Spell,json5Todo
+syn region  json5Comment        start="/\*"  end="\*/" fold 
contains=@Spell,json5Todo
+
+syn keyword json5Todo           contained TODO FIXME XXX
 
 " Define the default highlighting
 hi def link json5String             String
@@ -66,6 +68,7 @@ hi def link json5Boolean            Boolean
 hi def link json5LineComment        Comment
 hi def link json5Comment            Comment
 hi def link json5NumError           Error
+hi def link json5Todo               Todo
 
 if !exists('b:current_syntax')
   let b:current_syntax = 'json5'

-- 
-- 
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 on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rGLEP-006fnw-1n%40256bit.org.

Raspunde prin e-mail lui