mirror of
https://github.com/neovim/neovim.git
synced 2025-11-15 06:49:01 +00:00
vim-patch:e1e3474: runtime(vim): Update base syntax, fix :augroup error matching (#36512)
Only terminate the :augroup END argument at whitespace, comments and
trailing bars.
closes: vim/vim#18711
e1e347475e
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -383,13 +383,13 @@ syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen
|
|||||||
|
|
||||||
" define
|
" define
|
||||||
VimFolda syn region vimAugroup
|
VimFolda syn region vimAugroup
|
||||||
\ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+"
|
\ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S"
|
||||||
\ matchgroup=vimAugroupKey
|
\ matchgroup=vimAugroupKey
|
||||||
\ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"
|
\ end="\<aug\%[roup]\ze\s\+[eE][nN][dD]\s*\%($\|[|"#]\)"
|
||||||
\ skipwhite nextgroup=vimAugroupEnd
|
\ skipwhite nextgroup=vimAugroupEnd
|
||||||
\ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
|
\ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
|
||||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
|
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
|
||||||
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
|
syn match vimAugroupError "\<aug\%[roup]\s\+[eE][nN][dD]\ze\s*\%($\|[|"#]\)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" TODO: Vim9 comment
|
" TODO: Vim9 comment
|
||||||
|
|||||||
Reference in New Issue
Block a user