neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1e2f86394af8758b565ff932a1d63a7b6f67cf8e
parent 700840f4b7675fe33f6ddaf6f34063171b0cd209
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri, 18 Apr 2025 14:45:46 +0800

vim-patch:adb703e: runtime(vim): Update base-syntax, match protected constructors

Support for protected constructors was added in commit 7e89800.

closes: 16618

https://github.com/vim/vim/commit/adb703e1b98b71f2908ecc7b7d4180f586caafb8

Co-authored-by: Doug Kearns <dougkearns@gmail.com>

Diffstat:
Mruntime/syntax/vim.vim | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim @@ -460,7 +460,7 @@ if s:vim9script \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError \ contains=vimDefParam,vim9Comment,vimFuncParamEquals - syn match vim9ConstructorDefName contained "\<new\w*\>" + syn match vim9ConstructorDefName contained "\<_\=new\w*\>" \ nextgroup=vim9ConstructorDefParams \ contains=@vim9MethodName syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>" @@ -497,14 +497,14 @@ if s:vim9script if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vim9MethodNameError contained "\<[a-z0-9]\i\>" endif - syn match vim9MethodName contained "\<new\w*\>" + syn match vim9MethodName contained "\<_\=new\w*\>" syn keyword vim9MethodName contained empty len string syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError 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*:\=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 syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold