aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-09-29 09:15:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-09-29 09:15:17 +0800
commit0ebb2ec4e43df20a48104407a601aafeeccbb360 (patch)
tree3347c701feb476f8e3a31abfd347037b0be565b5 /runtime
parent22f6b9d11fbe19c1ac2125d83e220ac40831ddbc (diff)
downloadrneovim-0ebb2ec4e43df20a48104407a601aafeeccbb360.tar.gz
rneovim-0ebb2ec4e43df20a48104407a601aafeeccbb360.tar.bz2
rneovim-0ebb2ec4e43df20a48104407a601aafeeccbb360.zip
vim-patch:4de931d: runtime(vim): Update base syntax, match enum constructor type args
closes: vim/vim#17840 https://github.com/vim/vim/commit/4de931daae88784aacd1dc4ecd92ca6fb4a45977 Co-authored-by: Doug Kearns <dougkearns@gmail.com> Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/syntax/vim.vim9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 33133f4335..ec9c5e1ce5 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -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