mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:30:04 +08:00
Hide in normal
This commit is contained in:
parent
a2ab6a6cda
commit
7cf034217f
@ -36,26 +36,49 @@ function! s:self.hi(info) abort
|
||||
return
|
||||
endif
|
||||
let cmd = 'hi! ' . a:info.name
|
||||
\ . ' ctermbg=' . a:info.ctermbg
|
||||
\ . ' ctermfg=' . a:info.ctermfg
|
||||
\ . ' guibg=' . a:info.guibg
|
||||
\ . ' guifg=' . a:info.guifg
|
||||
if !empty(a:info.ctermbg)
|
||||
let cmd .= ' ctermbg=' . a:info.ctermbg
|
||||
endif
|
||||
if !empty(a:info.ctermfg)
|
||||
let cmd .= ' ctermfg=' . a:info.ctermfg
|
||||
endif
|
||||
if !empty(a:info.guibg)
|
||||
let cmd .= ' guibg=' . a:info.guibg
|
||||
endif
|
||||
if !empty(a:info.guifg)
|
||||
let cmd .= ' guifg=' . a:info.guifg
|
||||
endif
|
||||
let style = []
|
||||
for sty in ['hold', 'italic', 'underline']
|
||||
if a:info[sty] ==# '1'
|
||||
if get(a:info, sty, '') ==# '1'
|
||||
call add(style, sty)
|
||||
endif
|
||||
endfor
|
||||
|
||||
if !empty(style)
|
||||
let cmd .= ' gui=' . join(style, ',') . ' cterm=' . join(style, ',')
|
||||
endif
|
||||
|
||||
try
|
||||
exe cmd
|
||||
catch
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function! s:self.hide_in_normal(name) abort
|
||||
let group = self.group2dict(a:name)
|
||||
if empty(group)
|
||||
return
|
||||
endif
|
||||
if &termguicolors || has('gui_running')
|
||||
let g:wsd = self.group2dict('Normal')
|
||||
let bg = self.group2dict('Normal').guibg
|
||||
let group.guifg = bg
|
||||
let group.guibg = bg
|
||||
else
|
||||
let bg = self.group2dict('Normal').ctermbg
|
||||
let group.ctermfg = bg
|
||||
let group.ctermbg = bg
|
||||
endif
|
||||
call self.hi(group)
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#api#vim#highlight#get() abort
|
||||
|
@ -104,11 +104,12 @@ endfunction
|
||||
function! s:fix_gruvbox() abort
|
||||
if &background ==# 'dark'
|
||||
hi VertSplit guibg=#282828 guifg=#181A1F
|
||||
hi EndOfBuffer guibg=#282828 guifg=#282828
|
||||
"hi EndOfBuffer guibg=#282828 guifg=#282828
|
||||
else
|
||||
hi VertSplit guibg=#fbf1c7 guifg=#e7e9e1
|
||||
hi EndOfBuffer guibg=#fbf1c7 guifg=#fbf1c7
|
||||
"hi EndOfBuffer guibg=#fbf1c7 guifg=#fbf1c7
|
||||
endif
|
||||
call SpaceVim#api#import('vim#highlight').hide_in_normal('EndOfBuffer')
|
||||
hi SpaceVimLeaderGuiderGroupName cterm=bold ctermfg=175 gui=bold guifg=#d3869b
|
||||
endfunction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user