mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:adb703e: runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.
closes: 16618
adb703e1b9
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -460,7 +460,7 @@ if s:vim9script
|
|||||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
|
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
|
||||||
\ contains=vimDefParam,vim9Comment,vimFuncParamEquals
|
\ contains=vimDefParam,vim9Comment,vimFuncParamEquals
|
||||||
|
|
||||||
syn match vim9ConstructorDefName contained "\<new\w*\>"
|
syn match vim9ConstructorDefName contained "\<_\=new\w*\>"
|
||||||
\ nextgroup=vim9ConstructorDefParams
|
\ nextgroup=vim9ConstructorDefParams
|
||||||
\ contains=@vim9MethodName
|
\ contains=@vim9MethodName
|
||||||
syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
|
syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
|
||||||
@@ -497,14 +497,14 @@ if s:vim9script
|
|||||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||||
syn match vim9MethodNameError contained "\<[a-z0-9]\i\>"
|
syn match vim9MethodNameError contained "\<[a-z0-9]\i\>"
|
||||||
endif
|
endif
|
||||||
syn match vim9MethodName contained "\<new\w*\>"
|
syn match vim9MethodName contained "\<_\=new\w*\>"
|
||||||
syn keyword vim9MethodName contained empty len string
|
syn keyword vim9MethodName contained empty len string
|
||||||
|
|
||||||
syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
|
syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
|
||||||
|
|
||||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||||
syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
||||||
syn region vim9MethodDefFold contained start="^\s*:\=def\s\+new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
syn region vim9MethodDefFold contained start="^\s*:\=def\s\+_\=new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold
|
syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold
|
||||||
|
Reference in New Issue
Block a user