From 82910ddbfbf178468357f18d91ecc36fa06a06c3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 10 Nov 2025 07:59:28 +0800 Subject: [PATCH 1/3] vim-patch:433d2ab: runtime(vim): Update base syntax, match Vim9 lambda arg to :defer Support added in commit 21ef3c6e5972bbe8ab61195f98ccb85048b78985. See: vim/vim#18643 closes: vim/vim#18645 https://github.com/vim/vim/commit/433d2ab2066c0590e43f8396cd830a4ff62e8769 Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index a688ed8933..3f0d2c9329 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -304,7 +304,7 @@ syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount " Defer {{{2 " ===== -syn match vimDefer "\" skipwhite nextgroup=@vimFunc +syn match vimDefer "\" skipwhite nextgroup=@vimFunc,vim9LambdaParams " Exception Handling {{{2 syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList From 24ecd0c48defac60bd677bf06509181afc5cf07b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 10 Nov 2025 07:59:51 +0800 Subject: [PATCH 2/3] vim-patch:59f0ea5: runtime(vim): Update base syntax, match Vim9 object type constructor fixes: vim/vim#18677. closes: vim/vim#18691 Reported by Aliaksei Budavei. https://github.com/vim/vim/commit/59f0ea5b3eb444748c83340f1dcebb182db28b40 Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 3f0d2c9329..274348d40d 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -561,13 +561,20 @@ syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType conta syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType syn keyword vimType contained blob bool channel float job number string void syn keyword vimTypeAny contained any +syn region vimTypeObject contained + \ matchgroup=vimType + \ start="\" syn region vimCompoundType contained matchgroup=vimType start="\" -syn cluster vimType contains=vimType,vimTypeAny,vimCompoundType,vimUserType +syn cluster vimType contains=vimType,vimTypeAny,vimTypeObject,vimCompoundType,vimUserType " Classes, Enums And Interfaces: {{{2 " ============================= @@ -1118,6 +1125,13 @@ syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@ syn match vim9VariableTypeSep contained "\S\@1<=:\%(\s\|\n\)\@=" skipwhite nextgroup=@vim9VariableType syn keyword vim9VariableType contained blob bool channel float job number string void skipwhite nextgroup=vimLetHeredoc syn keyword vim9VariableTypeAny contained any skipwhite nextgroup=vimLetHeredoc +syn region vim9VariableTypeObject contained + \ matchgroup=vimType + \ start="\" skipwhite nextgroup=vimLetHeredoc syn region vim9VariableCompoundType contained \ matchgroup=vim9VariableType @@ -1143,7 +1157,7 @@ syn region vim9VariableCompoundType contained \ transparent syn match vim9VariableUserType contained "\<\%(\h\w*\.\)*\u\w*\>" skipwhite nextgroup=vimLetHeredoc -syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableCompoundType,vim9VariableUserType +syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableTypeObject,vim9VariableCompoundType,vim9VariableUserType " Lockvar and Unlockvar: {{{2 " ===================== @@ -2584,6 +2598,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimTodo Todo hi def link vimType Type hi def link vimTypeAny vimType + hi def link vimTypeObject vimType hi def link vimUniq vimCommand hi def link vimUniqBang vimBang hi def link vimUniqOptions Special @@ -2675,7 +2690,8 @@ if !exists("skip_vim_syntax_inits") hi def link vim9TypeEquals vimOper hi def link vim9Variable vimVar hi def link vim9VariableType vimType - hi def link vim9VariableTypeAny vimType + hi def link vim9VariableTypeAny vimTypeAny + hi def link vim9VariableTypeObject vimTypeObject hi def link vim9Var vimCommand hi def link vim9Vim9ScriptArg Special hi def link vim9Vim9Script vimCommand From 4466c950cb841f0dd34ed30f6609632ba19d576d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 10 Nov 2025 08:00:15 +0800 Subject: [PATCH 3/3] vim-patch:8869800: runtime(vim): Update base syntax, match :*do command arg Match the Ex command arg to all :*do commands. closes: vim/vim#18700 https://github.com/vim/vim/commit/8869800f704ea0568d4741b960fc547f6853255f Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 274348d40d..894f245fe2 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -232,7 +232,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" contains=vimCount " ===== syn match vimDefer "\" skipwhite nextgroup=@vimFunc,vim9LambdaParams +" *Do commands {{{2 +" ============ +syn match vimDoCommandBang contained "\a\@1<=!" skipwhite nextgroup=@vimCmdList + +syn keyword vimDoCommand argdo bufd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand tabd[o] wind[o] skipwhite nextgroup=@vimCmdList +syn keyword vimDoCommand cdo cfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand ld[o] lfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand foldd[oopen] folddoc[losed] skipwhite nextgroup=@vimCmdList + " Exception Handling {{{2 syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern @@ -2373,6 +2383,8 @@ if !exists("skip_vim_syntax_inits") hi def link vimDelfunctionBang vimBang hi def link vimDoautocmd vimCommand hi def link vimDoautocmdMod Special + hi def link vimDoCommand vimCommand + hi def link vimDoCommandBang vimBang hi def link vimEcho vimCommand hi def link vimEchohlNone vimGroup hi def link vimEchohl vimCommand