mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
vim-patch:570e71a: runtime(vim): Update base-syntax, improve :set highlighting (#34240)
- Match comments and trailing bar after :set without args.
- Match the <...> form for key code options.
- Remove orphaned vim_ex_python[3x]* dump files (Aliaksei Budavei).
closes: vim/vim#17397
570e71a277
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -843,14 +843,14 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
|
|||||||
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
||||||
|
|
||||||
" Set command and associated set-options (vimOptions) with comment {{{2
|
" Set command and associated set-options (vimOptions) with comment {{{2
|
||||||
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
|
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimCmdSep,vimComment,vimSetArgs
|
||||||
syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
|
syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
|
||||||
syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
|
syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
|
||||||
syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
|
syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
|
||||||
syn match vimSetBarEscape contained "\\|"
|
syn match vimSetBarEscape contained "\\|"
|
||||||
syn match vimSetQuoteEscape contained +\\"+
|
syn match vimSetQuoteEscape contained +\\"+
|
||||||
syn region vimSetArgs contained
|
syn region vimSetArgs contained
|
||||||
\ start="\S"
|
\ start="\l\|<"
|
||||||
\ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
|
\ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
|
||||||
\ end=+\ze\\\@1<![|"]+
|
\ end=+\ze\\\@1<![|"]+
|
||||||
"\ assume this isn't an escaped char with backslash on the previous line
|
"\ assume this isn't an escaped char with backslash on the previous line
|
||||||
@@ -860,6 +860,8 @@ syn region vimSetArgs contained
|
|||||||
\ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
|
\ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
|
||||||
\ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
|
\ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
|
||||||
\ keepend
|
\ keepend
|
||||||
|
" TODO: restrict this to valid values?
|
||||||
|
syn match vimOption contained "<[^>]\+>" contains=vimOption
|
||||||
syn region vimSetEqual contained
|
syn region vimSetEqual contained
|
||||||
\ matchgroup=vimOper
|
\ matchgroup=vimOper
|
||||||
\ start="[=:]\|[-+^]="
|
\ start="[=:]\|[-+^]="
|
||||||
|
Reference in New Issue
Block a user