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