mirror of
https://github.com/vim/vim.git
synced 2026-08-17 05:59:12 +02:00
runtime(vim): Update base syntax, fix mismtatched :def return type
Anchor the return type separator ':' with a lookbehind as the relevant nextgroup options use skipwhite. closes: #20319 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
3a90b2ba8e
commit
dfdeba16d7
@@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2026 Feb 20
|
||||
" Last Change: 2026 May 24
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@@ -520,7 +520,7 @@ syn match vim9LambdaParams contained
|
||||
\ "(\%(\<func(\|[^(]\)*\%(\n\s*\\\%(\<func(\|[^(]\)*\|\n\s*#\\ .*\)*\ze\s\+=>"
|
||||
\ skipwhite nextgroup=vim9LambdaOperator
|
||||
\ contains=@vim9Continue,vimDefParam,vim9LambdaParen,vim9LambdaReturnType
|
||||
syn region vim9LambdaReturnType contained start=")\@<=:\s" end="\ze\s*#" end="\ze\s*=>" contains=@vim9Continue,@vimType transparent
|
||||
syn region vim9LambdaReturnType contained start=")\@1<=:\s" end="\ze\s*#" end="\ze\s*=>" contains=@vim9Continue,@vimType transparent
|
||||
syn region vim9LambdaBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
|
||||
|
||||
syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment
|
||||
@@ -630,7 +630,7 @@ syn match vimDelfunction "\<delf\%[unction]\>" skipwhite nextgroup=vimDelfunct
|
||||
" =====
|
||||
|
||||
syn region vimReturnType contained
|
||||
\ start=":\%(\s\|\n\)\@="
|
||||
\ start=")\@1<=:\%(\s\|\n\)\@="
|
||||
\ skip=+\n\s*\%(\\\|#\\ \)\|^\s*#\\ +
|
||||
\ end="$"
|
||||
\ matchgroup=vim9Comment
|
||||
@@ -697,7 +697,7 @@ if s:vim9script
|
||||
\ contains=vim9DefTypeParam
|
||||
|
||||
syn region vim9MethodDefReturnType contained
|
||||
\ start=":\%(\s\|\n\)\@="
|
||||
\ start=")\@1<=:\%(\s\|\n\)\@="
|
||||
\ skip=+\n\s*\%(\\\|#\\ \)\|^\s*#\\ +
|
||||
\ end="$"
|
||||
\ matchgroup=vim9Comment
|
||||
@@ -825,7 +825,7 @@ if s:vim9script
|
||||
\ skipwhite skipnl nextgroup=vimDefComment,vim9AbstractDefReturnType,vimCommentError
|
||||
\ contains=vimDefParam,vim9Comment,vimFunctionParamEquals
|
||||
syn region vim9AbstractDefReturnType contained
|
||||
\ start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]"
|
||||
\ start=")\@1<=:\s" end="$" matchgroup=vim9Comment end="\ze[#"]"
|
||||
\ skipwhite skipnl nextgroup=vimDefComment,vimCommentError
|
||||
\ contains=vimTypeSep
|
||||
\ transparent
|
||||
|
||||
Reference in New Issue
Block a user