mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 02:40:05 +08:00
Theme support in mapping guide
This commit is contained in:
parent
9cddb61cda
commit
30c34008f5
@ -399,11 +399,7 @@ function! s:winopen() " {{{
|
||||
endfunction " }}}
|
||||
|
||||
function! s:updateStatusline() abort
|
||||
hi! LeaderGuiderPrompt cterm=bold gui=bold guifg=#282828 guibg=#a89984
|
||||
hi! LeaderGuiderSep1 cterm=bold gui=bold guifg=#a89984 guibg=#504945
|
||||
hi! LeaderGuiderName cterm=bold gui=bold guifg=#a89984 guibg=#504945
|
||||
hi! LeaderGuiderSep2 cterm=bold gui=bold guifg=#504945 guibg=#3c3836
|
||||
hi! LeaderGuiderFill guifg=#a89984 guibg=#3c3836
|
||||
call SpaceVim#mapping#guide#theme#hi()
|
||||
let gname = get(s:guide_group, 'name', '')
|
||||
if !empty(gname)
|
||||
let gname = ' - ' . gname[1:]
|
||||
|
17
autoload/SpaceVim/mapping/guide/theme.vim
Normal file
17
autoload/SpaceVim/mapping/guide/theme.vim
Normal file
@ -0,0 +1,17 @@
|
||||
function! SpaceVim#mapping#guide#theme#hi() abort
|
||||
let name = get(g:, 'color_name', 'gruvbox')
|
||||
try
|
||||
let t = SpaceVim#mapping#guide#theme#{name}#template()
|
||||
catch /^Vim\%((\a\+)\)\=:E117/
|
||||
let t = SpaceVim#mapping#guide#theme#gruvbox#templete()
|
||||
endtry
|
||||
call s:hi(t)
|
||||
endfunction
|
||||
|
||||
function! s:hi(t) abort
|
||||
exe 'hi! LeaderGuiderPrompt cterm=bold gui=bold guifg=' . a:t[0][0] . ' guibg=' . a:t[0][1]
|
||||
exe 'hi! LeaderGuiderSep1 cterm=bold gui=bold guifg=' . a:t[0][1] . ' guibg=' . a:t[1][1]
|
||||
exe 'hi! LeaderGuiderName cterm=bold gui=bold guifg=' . a:t[1][0] . ' guibg=' . a:t[1][1]
|
||||
exe 'hi! LeaderGuiderSep2 cterm=bold gui=bold guifg=' . a:t[1][1] . ' guibg=' . a:t[2][1]
|
||||
exe 'hi! LeaderGuiderFill guifg=' . a:t[2][0] . ' guibg=' . a:t[2][1]
|
||||
endfunction
|
7
autoload/SpaceVim/mapping/guide/theme/gruvbox.vim
Normal file
7
autoload/SpaceVim/mapping/guide/theme/gruvbox.vim
Normal file
@ -0,0 +1,7 @@
|
||||
function! SpaceVim#mapping#guide#theme#gruvbox#template() abort
|
||||
return [
|
||||
\ ['#282828', '#a89984'],
|
||||
\ ['#a89984', '#504945'],
|
||||
\ ['#a89984', '#3c3836']
|
||||
\ ]
|
||||
endfunction
|
Loading…
Reference in New Issue
Block a user