diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-24 12:16:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-24 04:16:36 +0000 |
commit | 56fabcadb6df46c70402e4f9cd1b851856fb57e9 (patch) | |
tree | 63f8b433d3dd7fa4bee00aa82cf39ae9d3255cbf | |
parent | 01236c3bfeba90a254de75ec720543baf75e6632 (diff) | |
download | rneovim-56fabcadb6df46c70402e4f9cd1b851856fb57e9.tar.gz rneovim-56fabcadb6df46c70402e4f9cd1b851856fb57e9.tar.bz2 rneovim-56fabcadb6df46c70402e4f9cd1b851856fb57e9.zip |
vim-patch:025dc48: runtime(vim): Update base-syntax, match :CompilerSet and :SynMenu commands (#32605)
closes: vim/vim#16713
https://github.com/vim/vim/commit/025dc48e88790133ef0da583b2ce5b9c2232ea9e
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
-rw-r--r-- | runtime/syntax/vim.vim | 19 | ||||
-rw-r--r-- | test/functional/legacy/registers_spec.lua (renamed from test/functional/legacy/register_spec.lua) | 0 |
2 files changed, 18 insertions, 1 deletions
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 9dfccf0bc7..6ab800c7ac 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -195,7 +195,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vim syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimLockvar,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimLockvar,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 syn match vimCount contained "\d\+" @@ -905,6 +905,19 @@ syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,v " User Command Highlighting: {{{2 syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!' +" Vim user commands + +" Compiler plugins +syn match vimCompilerSet "\<CompilerSet\>" skipwhite nextgroup=vimSetRegion + +" runtime/makemenu.vim +syn match vimSynMenu "\<SynMenu\>" skipwhite nextgroup=vimSynMenuPath +syn match vimSynMenuPath contained ".*\ze:" nextgroup=vimSynMenuColon contains=vimMenuNotation +syn match vimSynMenuColon contained ":" nextgroup=vimSynMenuName +syn match vimSynMenuName contained "\w\+" + +syn cluster vimExUserCmdList contains=vimCompilerSet,vimSynMenu + " Errors And Warnings: {{{2 " ==================== if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") @@ -1636,6 +1649,10 @@ if !exists("skip_vim_syntax_inits") hi def link vim9Vim9ScriptArg Special hi def link vim9Vim9Script vimCommand + hi def link vimCompilerSet vimCommand + hi def link vimSynMenu vimCommand + hi def link vimSynMenuPath vimMenuName + hi def link nvimAutoEvent vimAutoEvent hi def link nvimHLGroup vimHLGroup endif diff --git a/test/functional/legacy/register_spec.lua b/test/functional/legacy/registers_spec.lua index df470f3009..df470f3009 100644 --- a/test/functional/legacy/register_spec.lua +++ b/test/functional/legacy/registers_spec.lua |