runtime(vim): Add support for `syntax foldlevel` command (#6182)

Commit: 
https://github.com/vim/vim/commit/d4634a26cdcdbd0f22ec608bb4954cd7eb8db528
Author: Brad King <[email protected]>
Date:   Wed Jan 3 10:17:24 2024 -0500

    runtime(vim): Add support for `syntax foldlevel` command 
(https://github.com/vim/vim/issues/6182)
    
    
    Signed-off-by: Brad King <[email protected]>
    Signed-off-by: Doug Kearns <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index ca54162dc..08414a62d 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -557,6 +557,13 @@ syn match  vimGroupAdd     contained       "add="  
nextgroup=vimGroupList
 syn match      vimGroupRem     contained       "remove="       
nextgroup=vimGroupList
 syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
 
+" Syntax: foldlevel {{{2
+syn keyword    vimSynType      contained       foldlevel       skipwhite 
nextgroup=vimSynFoldMethod,vimSynFoldMethodError
+if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldmethoderror")
+ syn match     vimSynFoldMethodError   contained       "\i\+"
+endif
+syn keyword    vimSynFoldMethod        contained       start   minimum
+
 " Syntax: iskeyword {{{2
 syn keyword    vimSynType      contained       iskeyword       skipwhite 
nextgroup=vimIskList
 syn match      vimIskList      contained       '\S\+'  contains=vimIskSep
@@ -901,6 +908,7 @@ if !exists("skip_vim_syntax_inits")
   hi def link vimMapModErr     vimError
   hi def link vimSubstFlagErr  vimError
   hi def link vimSynCaseError  vimError
+  hi def link vimSynFoldMethodError    vimError
   hi def link vimBufnrWarn     vimWarn
  endif
 
@@ -1038,6 +1046,8 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimSyncNone       Type
  hi def link vimSynContains    vimSynOption
  hi def link vimSynError       Error
+ hi def link vimSynFoldMethodError     Error
+ hi def link vimSynFoldMethod  Type
  hi def link vimSynKeyContainedin      vimSynContains
  hi def link vimSynKeyOpt      vimSynOption
  hi def link vimSynMtchGrp     vimSynOption

-- 
-- 
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/E1rL3C6-00AvHO-2E%40256bit.org.

Raspunde prin e-mail lui