1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:40:06 +08:00

Merge pull request #1509 from wsdjeg/doc

Fix #1505
This commit is contained in:
Wang Shidong 2018-03-18 21:05:40 +08:00 committed by GitHub
commit dc8a234b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 12 deletions

View File

@ -151,12 +151,12 @@ function! SpaceVim#autocmds#VimEnter() abort
for argv in g:_spacevim_mappings_space_custom
call call('SpaceVim#mapping#space#def', argv)
endfor
if get(g:, '_spacevim_statusline_loaded', 0) == 1
if SpaceVim#layers#isLoaded('core#statusline')
set laststatus=2
call SpaceVim#layers#core#statusline#def_colors()
setlocal statusline=%!SpaceVim#layers#core#statusline#get(1)
endif
if get(g:, '_spacevim_tabline_loaded', 0) == 1
if SpaceVim#layers#isLoaded('core#tabline')
call SpaceVim#layers#core#tabline#def_colors()
set showtabline=2
endif

View File

@ -72,14 +72,16 @@ function! SpaceVim#layers#checkers#config() abort
call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'call call('
\ . string(s:_function('s:error_transient_state')) . ', [])',
\ 'error-transient-state', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
\ 'toggle syntax checker', 1)
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
\ 'toggle syntax checker', 1)
augroup SpaceVim_layer_checker
autocmd!
if g:spacevim_enable_neomake
autocmd User NeomakeFinished nested
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
if SpaceVim#layers#isLoaded('core#statusline')
autocmd User NeomakeFinished nested
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endif
if s:show_cursor_error
" when move cursor, the error message will be shown below current line
" after a delay
@ -95,7 +97,7 @@ function! SpaceVim#layers#checkers#config() abort
autocmd InsertEnter,WinLeave * call <SID>neomake_signatures_clear()
endif
endif
elseif g:spacevim_enable_ale
elseif g:spacevim_enable_ale && SpaceVim#layers#isLoaded('core#statusline')
autocmd User ALELint
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endif
@ -150,9 +152,9 @@ function! s:verify_syntax_setup() abort
endfunction
function! s:toggle_syntax_checker() abort
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
verbose NeomakeToggle
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
verbose NeomakeToggle
endfunction
function! s:error_transient_state() abort

View File

@ -17,7 +17,7 @@ function! SpaceVim#layers#ui#plugins() abort
\ ['t9md/vim-choosewin', {'merged' : 0}],
\ ['mhinz/vim-startify', {'loadconf' : 1, 'merged' : 0}],
\ ]
if get(g:, '_spacevim_statusline_loaded', 0) == 0
if !SpaceVim#layers#isLoaded('core#statusline')
call add(plugins, ['vim-airline/vim-airline', { 'merged' : 0,
\ 'loadconf' : 1}])
call add(plugins, ['vim-airline/vim-airline-themes', { 'merged' : 0}])