mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
vim-patch:8da8862: runtime(vim): Update base syntax, match full :history command (#36655)
closes: vim/vim#18784
8da886269a
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
|
||||
|
||||
" 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,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,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 match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
||||
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||
@@ -376,6 +376,16 @@ endif
|
||||
syn keyword vimFTCmd contained filet[ype]
|
||||
syn keyword vimFTOption contained detect indent off on plugin
|
||||
|
||||
" History {{{2
|
||||
" =======
|
||||
" TODO: handle Vim9 "history" variable assignment (like :wincmd, but a common variable name)
|
||||
syn keyword vimHistory his[tory] skipwhite nextgroup=vimHistoryName,vimHistoryRange,vimCmdSep,vimComment,vim9Comment
|
||||
syn keyword vimHistoryName contained c[md] s[earch] e[xpr] i[nput] d[ebug] a[ll] skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
|
||||
syn match vimHistoryName contained "[:/?=@>]" skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
|
||||
syn match vimHistoryRange contained "-\=\<\d\+\>\%(\s*,\)\=" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
|
||||
syn match vimHistoryRange contained ",\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
|
||||
syn match vimHistoryRange contained "-\=\<\d\+\s*,\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
|
||||
|
||||
" Import {{{2
|
||||
" ======
|
||||
syn keyword vimImportAutoload contained autoload skipwhite nextgroup=vimImportFilename
|
||||
@@ -2512,6 +2522,8 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimHiStartStop vimHiTerm
|
||||
hi def link vimHiTerm Type
|
||||
hi def link vimHLGroup vimGroup
|
||||
hi def link vimHistory vimCommand
|
||||
hi def link vimHistoryName Special
|
||||
hi def link vimImport vimCommand
|
||||
hi def link vimImportAutoload Special
|
||||
hi def link vimImportAs vimImport
|
||||
|
||||
Reference in New Issue
Block a user