From 1b6848c2990cbaf1aefdd819b2a80925f423b576 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 18 Jul 2025 07:06:51 +0800 Subject: [PATCH] vim-patch:175662f: runtime(vim): Update base syntax, fix incorrect function error (#34975) Don't match lower-case function names as errors when the qualifier includes a dict/list accessor. This is a less than perfect fix until qualified function call matching is reworked. fixes: vim/vim#17766 closes: vim/vim#17780 https://github.com/vim/vim/commit/175662f4f2a046a5ca33338cd3c1ca017e135ee8 Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 508caf5bac..2edc49a9da 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -281,7 +281,7 @@ syn keyword vimBehaveModel contained mswin xterm " Call {{{2 " ==== -syn match vimCall "\" skipwhite nextgroup=@vimFunc +syn match vimCall "\" skipwhite nextgroup=vimVar,@vimFunc " Debuggreedy {{{2 " =========== @@ -2066,6 +2066,7 @@ unlet s:interfaces " (following Gautam Iyer's suggestion) " ========================== syn match vimFunc contained "\<\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncName +syn match vimUserFunc contained "\.\@1<=\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncName syn match vimUserFunc contained "\<\%([[:upper:]_]\|\%(\h\w*\.\)\+\h\)\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vim9MethodName,vim9Super,vim9This syn match vimUserFunc contained "\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimVarScope syn match vimUserFunc contained "\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\%(\h\w*\.\)*\h\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimVarScope,vimNotation