runtime(vim): Update base-syntax, bug fixes

- Contain :profdel arguments.
- Fix string highlighting immediately after lambda -> operators.

Reported by Aliaksei Budavei.

closes: #17427

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2025-06-02 19:31:10 +02:00
committed by Christian Brabandt
parent 3b9b95dc63
commit 3993cd619a
21 changed files with 73 additions and 51 deletions

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jun 01
" Last Change: 2025 Jun 02
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -818,8 +818,8 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\
syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimEscape contained "\\."
@ -1354,9 +1354,9 @@ syn region vimProfilePattern contained
\ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
syn match vimProfile "\<prof\%[ile]\>" skipwhite nextgroup=vimProfileBang,vimProfileArg
syn keyword vimProfdelArg func skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg file skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg here skipwhite nextgroup=vimCmdSep,@vimComment
syn keyword vimProfdelArg contained func skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg contained file skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg contained here skipwhite nextgroup=vimCmdSep,@vimComment
syn match vimProfdel "\<profd\%[el]\>" skipwhite nextgroup=vimProfdelArg
" Redir: {{{2

View File

@ -17,4 +17,4 @@
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@75
@57|3|7|,|0|-|1| @7|1|5|%|
@57|3|7|,|0|-|1| @7|1|4|%|

View File

@ -17,4 +17,4 @@
@75
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|f|o@1|#|b|a|r|#|F|o@1|(+0#e000e06&|)| +0#0000000&@52
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
@57|5@1|,|1| @9|2|5|%|
@57|5@1|,|1| @9|2|3|%|

View File

@ -17,4 +17,4 @@
|f+0#af5f00255&|u|n|c|t|i|o|n| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@54
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@57|7|3|,|1| @9|3|4|%|
@57|7|3|,|1| @9|3|1|%|

View File

@ -17,4 +17,4 @@
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@75
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&@53
@57|9|1|,|0|-|1| @7|4|3|%|
@57|9|1|,|0|-|1| @7|4|0|%|

View File

@ -17,4 +17,4 @@
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&|r+0#e000e06&|a|n|g|e| +0#0000000&|a+0#e000e06&|b|o|r|t| +0#0000000&|d+0#e000e06&|i|c|t| +0#0000000&|c+0#e000e06&|l|o|s|u|r|e| +0#0000000&@34
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@57|1|0|9|,|3| @8|5|3|%|
@57|1|0|9|,|3| @8|4|9|%|

View File

@ -17,4 +17,4 @@
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@53
@75
@75
@57|1|2|7|,|1| @8|6|2|%|
@57|1|2|7|,|1| @8|5|7|%|

View File

@ -17,4 +17,4 @@
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@75
@57|1|4|5|,|1| @8|7|1|%|
@57|1|4|5|,|1| @8|6@1|%|

View File

@ -17,4 +17,4 @@
@2|e+0#af5f00255&|c|h|o| +0#0000000&|a+0#00e0e07&|:|0@2| +0#0000000&@62
@2|e+0#af5f00255&|c|h|o| +0#0000000&|a+0#00e0e07&|:|0| +0#0000000&@64
@2|e+0#af5f00255&|c|h|o| +0#0000000&|a+0#00e0e07&|:|1| +0#0000000&|a+0#00e0e07&|:|2| +0#0000000&|a+0#00e0e07&|:|3| +0#0000000&|a+0#00e0e07&|:|4| +0#0000000&|a+0#00e0e07&|:|5| +0#0000000&|a+0#00e0e07&|:|6| +0#0000000&|a+0#00e0e07&|:|7| +0#0000000&|a+0#00e0e07&|:|8| +0#0000000&|a+0#00e0e07&|:|9| +0#0000000&|a+0#00e0e07&|:|1|0| +0#0000000&|a+0#00e0e07&|:|1@1| +0#0000000&|a+0#00e0e07&|:|1|2| +0#0000000&|a+0#00e0e07&|:|1|3| +0#0000000&|a+0#00e0e07&|:|1|4| +0#0000000&|a+0#00e0e07&|:|1|5|@+0#4040ff13&@2
| +0#0000000&@56|1|6|3|,|3| @8|8|0|%|
| +0#0000000&@56|1|6|3|,|3| @8|7|4|%|

View File

@ -17,4 +17,4 @@
@2|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|4+0#e000002&|2| +0#0000000&@63
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@75
@57|1|8|0|,|1| @8|8|9|%|
@57|1|8|0|,|1| @8|8|2|%|

View File

@ -17,4 +17,4 @@
|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|F|o@1| @59
|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#00e0e07&|a|r| +0#0000000&@55
|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1| @58
@57|1|9|8|,|1| @8|9|8|%|
@57|1|9|8|,|1| @8|9|1|%|

View File

@ -1,20 +1,20 @@
|d+0#af5f00255#ffffff0|e|l|f|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1| @58
|d+0#af5f00255&|e|l|f|u|n|c|t|i|o|n| +0#0000000&|f|o@1|.+0#af5f00255&|b+0#00e0e07&|a|r| +0#0000000&@55
> @74
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|2|1|3|,|0|-|1| @6|B|o|t|
@75
@75
|"+0#0000e05&| |I|s@1|u|e| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|7|4|2|0|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|9|2|7@1|9|8|6|8|7| +0#0000000&@5
>"+0#0000e05&| |(|a|r|g| |n|a|m|e|d| |/|f|u|%|\|[|n|c|t|i|o|n|]|/|)| +0#0000000&@46
@75
|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
|s+0#af5f00255&|i|l|e|n|t|!| +0#0000000&|d+0#af5f00255&|e|l|f|u|n|c|!| +0#0000000&|f+0#af5f00255&|u|n|c| +0#0000000&@53
@75
@75
|"+0#0000e05&| |I|s@1|u|e| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|7|4|2|0|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|9|2|7@1|9|8|6|8|7| +0#0000000&@5
|"+0#0000e05&| |(|f|u|n|c|t|i|o|n| |n|a|m|e|d| |/|s|:|f|u|%|\|[|n|c|t|i|o|n|]|/|)| +0#0000000&@39
@75
|"+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@67
|f+0#af5f00255&|u|n|c|!| +0#0000000&|s+0#e000e06&|:|f+0#af5f00255&|u|n|c|(+0#e000e06&|_+0#00e0e07&|,+0#0000000&| |f+0#00e0e07&|u|n|c|)+0#e000e06&| +0#0000000&@53
@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|a+0#00e0e07&|:|f|u|n|c| +0#0000000&@57
|e+0#af5f00255&|n|d|f|u|n|c| +0#0000000&@67
@75
@57|2|1|6|,|1| @8|B|o|t|

View File

@ -17,4 +17,4 @@
@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|e+0#00e0e07&|x|p|r| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|}+0#0000001#ffff4012| +0#0000000#ffffff0@65
@57|3|7|,|7| @9|2|8|%|
@57|3|7|,|7| @9|2|6|%|

View File

@ -17,4 +17,4 @@
@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|z+0#00e0e07&| +0#0000000&@65
@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
@57|5@1|,|7| @9|4@1|%|
@57|5@1|,|7| @9|4|2|%|

View File

@ -17,4 +17,4 @@
@75
|l+0#af5f00255&|e|t| +0#0000000&|F+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|{+0#0000001#ffff4012|-|>| +0#0000000#ffffff0|#+0#e000e06&|{| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|a+0#00e0e07&|:| +0#0000000&|4+0#e000002&|2|,+0#0000000&| @60
@57|7|3|,|7| @9|6|0|%|
@57|7|3|,|7| @9|5|7|%|

View File

@ -17,4 +17,4 @@
@6|\+0#e000e06&| +0#0000000&|b+0#00e0e07&|:| +0#0000000&|8+0#e000002&|3| +0#0000000&@61
@6|\+0#e000e06&|}|}+0#0000001#ffff4012@1| +0#0000000#ffffff0@64
@75
@57|9|1|,|7| @9|7@1|%|
@57|9|1|,|7| @9|7|3|%|

View File

@ -17,4 +17,4 @@
@75
|:|e+0#af5f00255&|c|h|o| +0#0000000&|m+0#00e0e07&|a|p|(+0#e000e06&|[|1+0#e000002&|,+0#0000000&| |2+0#e000002&|,+0#0000000&| |3+0#e000002&|]+0#e000e06&|,+0#0000000&| |{+0#0000001#ffff4012|i+0#00e0e07#ffffff0|d|x|,+0#0000000&| |v+0#00e0e07&|a|l| +0#0000000&|-+0#0000001#ffff4012|>| +0#0000000#ffffff0|v+0#00e0e07&|a|l| +0#0000000&|++0#af5f00255&| +0#0000000&|1+0#e000002&|}+0#0000001#ffff4012|)+0#e000e06#ffffff0| +0#0000000&@31
|"+0#0000e05&| |[|2|,| |3|,| |4|]| @1| +0#0000000&@61
@57|1|0|9|,|1| @8|9|3|%|
@57|1|0|9|,|1| @8|8@1|%|

View File

@ -6,15 +6,15 @@
@16>\+0#e000e06&| +0#0000000&|{+0#0000001#ffff4012|-|>| +0#0000000#ffffff0|e+0#00e0e07&|x|e|c|u|t|e|(+0#e000e06&|"+0#e000002&|e|c|h|o| |'|H|a|n|d|l|e|r| |c|a|l@1|e|d|'|"|,+0#0000000&| |"+0#e000002&@1|)+0#e000e06&|}+0#0000001#ffff4012|,+0#0000000#ffffff0| @14
@16|\+0#e000e06&| +0#0000000&|{+0#e000e06&|'+0#e000002&|r|e|p|e|a|t|'|:+0#0000000&| |3+0#e000002&|}+0#e000e06&|)| +0#0000000&@42
@75
@75
|"+0#0000e05&| |I|s@1|u|e| |h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|p|u|l@1|/|1|7|4|2|0|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|9|2|7@1|9|8|6|8|7| +0#0000000&@5
|"+0#0000e05&| |(|s|t|r|i|n|g| |i|m@1|e|d|i|a|t|e|l|y| |a|f|t|e|r| |-|>| |o|p|e|r|a|t|o|r|)| +0#0000000&@34
@75
|l+0#af5f00255&|e|t| +0#0000000&|[|f+0#00e0e07&|u|n|c|,+0#0000000&| |_+0#00e0e07&|f|u|n|c|_|]+0#0000000&| |=+0#af5f00255&| +0#0000000&|[+0#e000e06&|{+0#0000001#ffff4012|-|>|"+0#e000002#ffffff0|f|u|n|c|"|}+0#0000001#ffff4012|(+0#e000e06#ffffff0|)|,+0#0000000&| |'+0#e000002&|f|u|n|c|'|]+0#e000e06&| +0#0000000&@31
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|2|7|,|3|-|1|7| @5|B|o|t|

View File

@ -211,3 +211,19 @@ delfunction foo.bar
delfunction! Foo
delfunction foo.bar
" Issue https://github.com/vim/vim/pull/17420#issuecomment-2927798687
" (arg named /fu%\[nction]/)
" FIXME
silent! delfunc! func
" Issue https://github.com/vim/vim/pull/17420#issuecomment-2927798687
" (function named /s:fu%\[nction]/)
" FIXME
func! s:func(_, func)
return a:func
endfunc

View File

@ -127,3 +127,9 @@ let Foo = {-> {-> #{
\ {-> execute("echo 'Handler called'", "")},
\ {'repeat': 3})
" Issue https://github.com/vim/vim/pull/17420#issuecomment-2927798687
" (string immediately after -> operator)
let [func, _func_] = [{->"func"}(), 'func']

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jun 01
" Last Change: 2025 Jun 02
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -873,8 +873,8 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\
syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimEscape contained "\\."
@ -1415,9 +1415,9 @@ syn region vimProfilePattern contained
\ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
syn match vimProfile "\<prof\%[ile]\>" skipwhite nextgroup=vimProfileBang,vimProfileArg
syn keyword vimProfdelArg func skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg file skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg here skipwhite nextgroup=vimCmdSep,@vimComment
syn keyword vimProfdelArg contained func skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg contained file skipwhite nextgroup=vimProfilePattern
syn keyword vimProfdelArg contained here skipwhite nextgroup=vimCmdSep,@vimComment
syn match vimProfdel "\<profd\%[el]\>" skipwhite nextgroup=vimProfdelArg
" Redir: {{{2