mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
runtime(vim): Update base syntax, refine object constructor matching
Match "object" and "<" ... ">" separately with dedicated syntax groups to allow for highlighting distinct from that generally used for types. closes: #18721 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
54cc820129
commit
fe24972139
@@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Nov 10
|
||||
" Last Change: 2025 Nov 11
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@@ -639,9 +639,10 @@ 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="\<object<"
|
||||
syn match vimTypeObject contained "\<object<\@=" nextgroup=vimTypeObjectArgs
|
||||
syn region vimTypeObjectArgs contained
|
||||
\ matchgroup=vimTypeObjectBracket
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ contains=vimTypeAny,vimTypeObject,vimUserType
|
||||
\ oneline
|
||||
@@ -1203,9 +1204,10 @@ 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="\<object<"
|
||||
syn match vim9VariableTypeObject contained "\<object<\@=" nextgroup=vim9VariableTypeObjectArgs
|
||||
syn region vim9VariableTypeObjectArgs
|
||||
\ matchgroup=vim9VariableTypeObjectBracket
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ contains=vimTypeAny,vimTypeObject,vimUserType
|
||||
\ oneline
|
||||
@@ -2675,6 +2677,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimType Type
|
||||
hi def link vimTypeAny vimType
|
||||
hi def link vimTypeObject vimType
|
||||
hi def link vimTypeObjectBracket vimTypeObject
|
||||
hi def link vimUniq vimCommand
|
||||
hi def link vimUniqBang vimBang
|
||||
hi def link vimUniqOptions Special
|
||||
@@ -2768,6 +2771,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vim9VariableType vimType
|
||||
hi def link vim9VariableTypeAny vimTypeAny
|
||||
hi def link vim9VariableTypeObject vimTypeObject
|
||||
hi def link vim9VariableTypeObjectBracket vimTypeObjectBracket
|
||||
hi def link vim9Var vimCommand
|
||||
hi def link vim9Vim9ScriptArg Special
|
||||
hi def link vim9Vim9Script vimCommand
|
||||
|
||||
Reference in New Issue
Block a user