mirror of
https://github.com/neovim/neovim.git
synced 2025-12-12 09:32:39 +00:00
vim-patch:a4c43a6: runtime(vim): Update base syntax, match full :language command (#36766)
closes: vim/vim#18808
a4c43a6cf5
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -232,7 +232,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi
|
|||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
" All vimCommands are contained by vimIsCommand. {{{2
|
" All vimCommands are contained by vimIsCommand. {{{2
|
||||||
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
|
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLanguage,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
|
||||||
syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
|
syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
|
||||||
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
||||||
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||||
@@ -427,6 +427,16 @@ endif
|
|||||||
syn match vimImportName contained "\%(\<as\s\+\)\@<=\h\w*\>" skipwhite nextgroup=@vimComment
|
syn match vimImportName contained "\%(\<as\s\+\)\@<=\h\w*\>" skipwhite nextgroup=@vimComment
|
||||||
syn match vimImport "\<imp\%[ort]\>" skipwhite nextgroup=vimImportAutoload,vimImportFilename
|
syn match vimImport "\<imp\%[ort]\>" skipwhite nextgroup=vimImportAutoload,vimImportFilename
|
||||||
|
|
||||||
|
" Language {{{2
|
||||||
|
" ========
|
||||||
|
syn keyword vimLanguage lan[guage] skipwhite nextgroup=@vimLanguageName,vimLanguageCategory,vimSep,vimComment,vim9Comment
|
||||||
|
syn keyword vimLanguageCategory contained col[late] cty[pe] mes[sages] tim[e] skipwhite nextgroup=@vimLanguageName
|
||||||
|
|
||||||
|
" [language[_territory][.codeset][@modifier]] and the reserved "C" and "POSIX"
|
||||||
|
syn match vimLanguageName contained "[[:alnum:]][[:alnum:]._@-]*[[:alnum:]]" nextgroup=vimSep,vimComment,vim9Comment
|
||||||
|
syn keyword vimLanguageNameReserved contained C POSIX nextgroup=vimSep,vimComment,vim9Comment
|
||||||
|
syn cluster vimLanguageName contains=vimLanguageName,vimLanguageNameReserved
|
||||||
|
|
||||||
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
|
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
|
||||||
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
|
" ======= : 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,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue
|
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue
|
||||||
@@ -2533,6 +2543,9 @@ if !exists("skip_vim_syntax_inits")
|
|||||||
hi def link vimKeymapTailComment vimComment
|
hi def link vimKeymapTailComment vimComment
|
||||||
hi def link vimLambdaBrace Delimiter
|
hi def link vimLambdaBrace Delimiter
|
||||||
hi def link vimLambdaOperator vimOper
|
hi def link vimLambdaOperator vimOper
|
||||||
|
hi def link vimLanguage vimCommand
|
||||||
|
hi def link vimLanguageCategory Special
|
||||||
|
hi def link vimLanguageNameReserved Constant
|
||||||
hi def link vimLet vimCommand
|
hi def link vimLet vimCommand
|
||||||
hi def link vimLetHeredoc vimString
|
hi def link vimLetHeredoc vimString
|
||||||
hi def link vimLetHeredocStart Special
|
hi def link vimLetHeredocStart Special
|
||||||
|
|||||||
Reference in New Issue
Block a user