aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-27 09:11:03 +0800
committerGitHub <noreply@github.com>2024-12-27 09:11:03 +0800
commit557f2d970044b04a364134ec45060b21b0f0b108 (patch)
tree64568d8ab4562682fbb7af852f58e60ee00f46c0
parent487c48ec8689b865bad04fdb87b61f5ada25da97 (diff)
downloadrneovim-557f2d970044b04a364134ec45060b21b0f0b108.tar.gz
rneovim-557f2d970044b04a364134ec45060b21b0f0b108.tar.bz2
rneovim-557f2d970044b04a364134ec45060b21b0f0b108.zip
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 https://github.com/vim/vim/commit/9b67a2e1ddf277faf01fa957bf72f7b804a7cb7f Co-authored-by: Doug Kearns <dougkearns@gmail.com>
-rw-r--r--runtime/syntax/vim.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 2a4bb2c8c9..361bf6369d 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -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