mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 08:28:34 +00:00
vim-patch:4de931d: runtime(vim): Update base syntax, match enum constructor type args
closes: vim/vim#17840
4de931daae
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
This commit is contained in:
@@ -692,12 +692,19 @@ if s:vim9script
|
||||
syn cluster vim9EnumNameContinue contains=vim9EnumNameContinue,vim9EnumNameContinueComment
|
||||
|
||||
" enforce enum value list location
|
||||
syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment
|
||||
syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueTypeArgs,vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment
|
||||
syn match vim9EnumValueListComma contained "," skipwhite skipempty nextgroup=vim9EnumValue,vim9EnumValueListCommaComment
|
||||
syn region vim9EnumValueListCommaComment contained
|
||||
\ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$"
|
||||
\ skipwhite skipempty nextgroup=vim9EnumValueListCommaComment,vim9EnumValue
|
||||
\ contains=@vimCommentGroup,vimCommentString
|
||||
syn region vim9EnumValueTypeArgs contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<\ze\a"
|
||||
\ end=">"
|
||||
\ nextgroup=vim9EnumValueArgList
|
||||
\ contains=@vimType
|
||||
\ oneline
|
||||
syn region vim9EnumValueArgList contained
|
||||
\ matchgroup=vimParenSep start="(" end=")"
|
||||
\ nextgroup=vim9EnumValueListComma
|
||||
|
Reference in New Issue
Block a user