diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-05 11:28:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 11:28:34 +0800 |
commit | 0ffc9264996573e2e8e4ad787c230ebda6fdf8ce (patch) | |
tree | 1045dd462ac26a9b98a2628bfd50f32daf402561 /runtime/syntax/vim.vim | |
parent | 971602029311c33353c88175f761557431330528 (diff) | |
download | rneovim-0ffc9264996573e2e8e4ad787c230ebda6fdf8ce.tar.gz rneovim-0ffc9264996573e2e8e4ad787c230ebda6fdf8ce.tar.bz2 rneovim-0ffc9264996573e2e8e4ad787c230ebda6fdf8ce.zip |
vim-patch:e5c9ba601573 (#27737)
runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (vim/vim#14137)
* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups
- Remove contained :syntax and :highlight sub-groups from the function
body cluster. These should only match in the respective commands.
- Remove vimSynLine syntax group from several clusters. The definition
of vimSynLine was removed in Vim 5.3.
* runtime(vim): Update syntax generator, use standard Last Change date format
The de facto standard date format is YYYY MMM DD.
https://github.com/vim/vim/commit/e5c9ba6015735b8b12e35dc5873bfc957dcbb600
Co-authored-by: dkearns <dougkearns@gmail.com>
Diffstat (limited to 'runtime/syntax/vim.vim')
-rw-r--r-- | runtime/syntax/vim.vim | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 5fc86bee01..2857146949 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -196,7 +196,7 @@ syn keyword vimFTOption contained detect indent off on plugin " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. -syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimNotation,vimCtrlChar,vimFuncVar,vimContinue syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd @@ -227,7 +227,7 @@ endif " Functions : Tag is provided for those who wish to highlight tagged functions {{{2 " ========= syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID -syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimSynLine +syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody @@ -271,7 +271,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained " User-Specified Commands: {{{2 " ======================= -syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine +syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange syn keyword vimUserCommand contained com[mand] syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter syn match vimUserAttrbError contained "-\a\+\ze\s" @@ -566,7 +566,6 @@ syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList -syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem " Syntax: foldlevel {{{2 syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError @@ -582,21 +581,18 @@ syn match vimIskSep contained ',' " Syntax: include {{{2 syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList -syn cluster vimFuncBodyList add=vimSynType " Syntax: keyword {{{2 syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" -syn cluster vimFuncBodyList add=vimSynType " Syntax: match {{{2 syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" -syn cluster vimFuncBodyList add=vimSynMtchGroup " Syntax: off and on {{{2 syn keyword vimSynType contained enable list manual off on reset @@ -617,7 +613,6 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" syn match vimSynNotPatRange contained "\\\\\|\\\[" syn match vimMtchComment contained '"[^"]\+$' -syn cluster vimFuncBodyList add=vimSynType " Syntax: sync {{{2 " ============ @@ -690,7 +685,6 @@ syn keyword vimHiClear contained clear nextgroup=vimHiGroup " see tst24 (hi def vs hi) (Jul 06, 2018) "syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster -syn cluster vimFuncBodyList add=vimHiLink " Control Characters: {{{2 " ================== |