mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:30:04 +08:00
Fix unite statusline
This commit is contained in:
parent
a6699061da
commit
62e6fe02fe
@ -205,7 +205,11 @@ function! SpaceVim#layers#core#statusline#get(...) abort
|
||||
\ . '%#SpaceVim_statusline_b#%{denite#get_status_sources()} %#SpaceVim_statusline_b_SpaceVim_statusline_z# '
|
||||
\ . '%#SpaceVim_statusline_z#%=%#SpaceVim_statusline_c_SpaceVim_statusline_z#'
|
||||
\ . '%#SpaceVim_statusline_c# %{denite#get_status_path() . denite#get_status_linenr()}'
|
||||
|
||||
elseif &filetype ==# 'unite'
|
||||
return '%#SpaceVim_statusline_a_bold#%{SpaceVim#layers#core#statusline#unite_mode()} Unite '
|
||||
\ . '%#SpaceVim_statusline_a_bold_SpaceVim_statusline_b# %{get(unite#get_context(), "buffer_name", "")} '
|
||||
\ . '%#SpaceVim_statusline_b_SpaceVim_statusline_c# '
|
||||
\ . '%#SpaceVim_statusline_c# %{unite#get_status_string()} '
|
||||
endif
|
||||
if a:0 > 0
|
||||
return s:active()
|
||||
@ -347,6 +351,7 @@ function! SpaceVim#layers#core#statusline#config() abort
|
||||
\ 'SpaceVim_statusline_ia', 'SpaceVim_statusline_b', 'SpaceVim_statusline_c', 'SpaceVim_statusline_z')
|
||||
endfunction
|
||||
let g:tagbar_status_func = 'TagbarStatusline'
|
||||
let g:unite_force_overwrite_statusline = 0
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#core#statusline#jump(i) abort
|
||||
@ -387,3 +392,18 @@ function! SpaceVim#layers#core#statusline#denite_mode()
|
||||
endif
|
||||
return dmode
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#core#statusline#unite_mode()
|
||||
let t = s:colors_template
|
||||
let dmode = mode()
|
||||
if get(w:, 'spacevim_statusline_mode', '') != dmode
|
||||
if dmode == 'NORMAL'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[0][2] . ' ctermfg=' . t[0][3] . ' guibg=' . t[0][1] . ' guifg=' . t[0][0]
|
||||
elseif dmode == 'INSERT'
|
||||
exe 'hi! SpaceVim_statusline_a_bold cterm=bold gui=bold ctermbg=' . t[4][3] . ' ctermfg=' . t[4][2] . ' guibg=' . t[4][1] . ' guifg=' . t[4][0]
|
||||
endif
|
||||
call s:HI.hi_separator('SpaceVim_statusline_a_bold', 'SpaceVim_statusline_b')
|
||||
let w:spacevim_statusline_mode = dmode
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
@ -41,10 +41,11 @@ CONTENTS *SpaceVim-contents*
|
||||
18. lang#python.............................|SpaceVim-layer-lang-python|
|
||||
19. lang#rust.................................|SpaceVim-layer-lang-rust|
|
||||
20. lang#scala...............................|SpaceVim-layer-lang-scala|
|
||||
21. lang#xml...................................|SpaceVim-layer-lang-xml|
|
||||
22. operator...................................|SpaceVim-layer-operator|
|
||||
23. shell.........................................|SpaceVim-layer-shell|
|
||||
24. tmux...........................................|SpaceVim-layer-tmux|
|
||||
21. lang#tmux.................................|SpaceVim-layer-lang-tmux|
|
||||
22. lang#xml...................................|SpaceVim-layer-lang-xml|
|
||||
23. operator...................................|SpaceVim-layer-operator|
|
||||
24. shell.........................................|SpaceVim-layer-shell|
|
||||
25. tmux...........................................|SpaceVim-layer-tmux|
|
||||
6. API........................................................|SpaceVim-api|
|
||||
1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu|
|
||||
2. sid............................................|SpaceVim-api-vim-sid|
|
||||
@ -884,6 +885,14 @@ MAPPINGS
|
||||
==============================================================================
|
||||
LANG#SCALA *SpaceVim-layer-lang-scala*
|
||||
|
||||
==============================================================================
|
||||
LANG#TMUX *SpaceVim-layer-lang-tmux*
|
||||
|
||||
INTRO
|
||||
The lang#tmux layer provides syntax highlighting, commenting, man page
|
||||
navigation and ability to execute lines as tmux commands.
|
||||
|SpaceVim-layer-checkers|
|
||||
|
||||
==============================================================================
|
||||
LANG#XML *SpaceVim-layer-lang-xml*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user