mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9b67a2e: runtime(vim): Update base-syntax, allow parens in default arguments (#31738)
Allow parentheses in default arguments specified in :def and :function
definitions.
fixes vim/vim#16243
closes: vim/vim#16269
9b67a2e1dd
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -309,8 +309,8 @@ syn match vimFuncSID contained "\<[sg]:"
|
||||
syn keyword vimFuncKey contained fu[nction]
|
||||
syn keyword vimDefKey contained def
|
||||
|
||||
syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,@vimContinue
|
||||
syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals
|
||||
syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipempty nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,vimOperParen,@vimContinue
|
||||
syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals,vimOperParen
|
||||
syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals
|
||||
syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals
|
||||
|
||||
|
Reference in New Issue
Block a user