vim-patch:a9c0642: runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens

- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: vim/vim#16622

a9c06429ac

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
zeertzjq
2025-02-13 09:05:01 +08:00
parent 3b4ef34fc3
commit 212fce1636

View File

@@ -253,7 +253,7 @@ syn keyword vimBehaveModel contained mswin xterm
" ==== " ====
syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc
" Debuggready {{{2 " Debuggreedy {{{2
" =========== " ===========
" TODO: special-cased until generalised range/count support is implemented " TODO: special-cased until generalised range/count support is implemented
syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount
@@ -298,7 +298,7 @@ syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBan
" Operators: {{{2 " Operators: {{{2
" ========= " =========
syn cluster vimOperGroup contains=@vimSpecialVar,vimFunc,vimLambda,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vim9LambdaParams,vimNull syn cluster vimOperGroup contains=@vimContinue,@vimExprList,vim9Comment
syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
@@ -698,7 +698,7 @@ syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]' syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '@"' syn match vimRegister '@"'
syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
syn match vimLetRegister contained '@["0-9\-a-zA-Z#=*+_/]' syn match vimLetRegister contained '@["0-9\-a-zA-Z:.%#=*+~_/]'
syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1