mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:30:04 +08:00
commit
dc8a234b7a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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}])
|
||||
|
Loading…
Reference in New Issue
Block a user