mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 07:00:04 +08:00
Fix highlight
This commit is contained in:
parent
da59781755
commit
d21d6be59e
@ -111,10 +111,7 @@ function! SpaceVim#plugins#manager#update(...) abort
|
||||
call s:new_window()
|
||||
let s:plugin_manager_buffer = bufnr('%')
|
||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nomodifiable nospell
|
||||
setf spacevim
|
||||
if exists('g:syntax_on')
|
||||
call s:syntax()
|
||||
endif
|
||||
setf SpaceVimPlugManager
|
||||
nnoremap <silent> <buffer> q :bd<CR>
|
||||
let s:pct = 0
|
||||
let s:plugins = a:0 == 0 ? keys(dein#get()) : copy(a:1)
|
||||
@ -207,58 +204,6 @@ function! s:new_window() abort
|
||||
execute get(g:, 'spacevim_window', 'vertical topleft new')
|
||||
endfunction
|
||||
|
||||
function! s:syntax() abort
|
||||
syntax clear
|
||||
syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber
|
||||
syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX
|
||||
syn match plugNumber /[0-9]\+[0-9.]*/ contained
|
||||
syn match plugBracket /[[\]]/ contained
|
||||
syn match plugX /x/ contained
|
||||
syn match plugDash /^-/
|
||||
syn match plugPlus /^+/
|
||||
syn match plugStar /^*/
|
||||
syn match plugMessage /\(^- \)\@<=.*/
|
||||
syn match plugName /\(^- \)\@<=[^ ]*:/
|
||||
syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/
|
||||
syn match plugTag /(tag: [^)]\+)/
|
||||
syn match plugInstall /\(^+ \)\@<=[^:]*/
|
||||
syn match plugUpdate /\(^* \)\@<=[^:]*/
|
||||
syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag
|
||||
syn match plugEdge /^ \X\+$/
|
||||
syn match plugEdge /^ \X*/ contained nextgroup=plugSha
|
||||
syn match plugSha /[0-9a-f]\{7,9}/ contained
|
||||
syn match plugRelDate /([^)]*)$/ contained
|
||||
syn match plugNotLoaded /(not loaded)$/
|
||||
syn match plugError /^x.*/
|
||||
syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/
|
||||
syn match plugH2 /^.*:\n-\+$/
|
||||
syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean
|
||||
hi def link plug1 Title
|
||||
hi def link plug2 Repeat
|
||||
hi def link plugH2 Type
|
||||
hi def link plugX Exception
|
||||
hi def link plugBracket Structure
|
||||
hi def link plugNumber Number
|
||||
|
||||
hi def link plugDash Special
|
||||
hi def link plugPlus Constant
|
||||
hi def link plugStar Boolean
|
||||
|
||||
hi def link plugMessage Function
|
||||
hi def link plugName Label
|
||||
hi def link plugInstall Function
|
||||
hi def link plugUpdate Type
|
||||
|
||||
hi def link plugError Error
|
||||
hi def link plugDeleted Ignore
|
||||
hi def link plugRelDate Comment
|
||||
hi def link plugEdge PreProc
|
||||
hi def link plugSha Identifier
|
||||
hi def link plugTag Constant
|
||||
|
||||
hi def link plugNotLoaded Comment
|
||||
endfunction
|
||||
|
||||
" change modifiable before setline
|
||||
if has('nvim')
|
||||
function! s:set_buf_line(bufnr, nr, line) abort
|
||||
|
49
syntax/SpaceVimPlugManager.vim
Normal file
49
syntax/SpaceVimPlugManager.vim
Normal file
@ -0,0 +1,49 @@
|
||||
syntax clear
|
||||
syntax region plug1 start=/\%1l/ end=/\%2l/ contains=plugNumber
|
||||
syntax region plug2 start=/\%2l/ end=/\%3l/ contains=plugBracket,plugX
|
||||
syn match plugNumber /[0-9]\+[0-9.]*/ contained
|
||||
syn match plugBracket /[[\]]/ contained
|
||||
syn match plugX /x/ contained
|
||||
syn match plugDash /^-/
|
||||
syn match plugPlus /^+/
|
||||
syn match plugStar /^*/
|
||||
syn match plugMessage /\(^- \)\@<=.*/
|
||||
syn match plugName /\(^- \)\@<=[^ ]*:/
|
||||
syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/
|
||||
syn match plugTag /(tag: [^)]\+)/
|
||||
syn match plugInstall /\(^+ \)\@<=[^:]*/
|
||||
syn match plugUpdate /\(^* \)\@<=[^:]*/
|
||||
syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag
|
||||
syn match plugEdge /^ \X\+$/
|
||||
syn match plugEdge /^ \X*/ contained nextgroup=plugSha
|
||||
syn match plugSha /[0-9a-f]\{7,9}/ contained
|
||||
syn match plugRelDate /([^)]*)$/ contained
|
||||
syn match plugNotLoaded /(not loaded)$/
|
||||
syn match plugError /^x.*/
|
||||
syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/
|
||||
syn match plugH2 /^.*:\n-\+$/
|
||||
syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean
|
||||
hi def link plug1 Title
|
||||
hi def link plug2 Repeat
|
||||
hi def link plugH2 Type
|
||||
hi def link plugX Exception
|
||||
hi def link plugBracket Structure
|
||||
hi def link plugNumber Number
|
||||
|
||||
hi def link plugDash Special
|
||||
hi def link plugPlus Constant
|
||||
hi def link plugStar Boolean
|
||||
|
||||
hi def link plugMessage Function
|
||||
hi def link plugName Label
|
||||
hi def link plugInstall Function
|
||||
hi def link plugUpdate Type
|
||||
|
||||
hi def link plugError Error
|
||||
hi def link plugDeleted Ignore
|
||||
hi def link plugRelDate Comment
|
||||
hi def link plugEdge PreProc
|
||||
hi def link plugSha Identifier
|
||||
hi def link plugTag Constant
|
||||
|
||||
hi def link plugNotLoaded Comment
|
Loading…
Reference in New Issue
Block a user