mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
commit
dc8a234b7a
@ -151,12 +151,12 @@ function! SpaceVim#autocmds#VimEnter() abort
|
|||||||
for argv in g:_spacevim_mappings_space_custom
|
for argv in g:_spacevim_mappings_space_custom
|
||||||
call call('SpaceVim#mapping#space#def', argv)
|
call call('SpaceVim#mapping#space#def', argv)
|
||||||
endfor
|
endfor
|
||||||
if get(g:, '_spacevim_statusline_loaded', 0) == 1
|
if SpaceVim#layers#isLoaded('core#statusline')
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
call SpaceVim#layers#core#statusline#def_colors()
|
call SpaceVim#layers#core#statusline#def_colors()
|
||||||
setlocal statusline=%!SpaceVim#layers#core#statusline#get(1)
|
setlocal statusline=%!SpaceVim#layers#core#statusline#get(1)
|
||||||
endif
|
endif
|
||||||
if get(g:, '_spacevim_tabline_loaded', 0) == 1
|
if SpaceVim#layers#isLoaded('core#tabline')
|
||||||
call SpaceVim#layers#core#tabline#def_colors()
|
call SpaceVim#layers#core#tabline#def_colors()
|
||||||
set showtabline=2
|
set showtabline=2
|
||||||
endif
|
endif
|
||||||
|
@ -72,14 +72,16 @@ function! SpaceVim#layers#checkers#config() abort
|
|||||||
call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['e', '.'], 'call call('
|
||||||
\ . string(s:_function('s:error_transient_state')) . ', [])',
|
\ . string(s:_function('s:error_transient_state')) . ', [])',
|
||||||
\ 'error-transient-state', 1)
|
\ 'error-transient-state', 1)
|
||||||
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
|
call SpaceVim#mapping#space#def('nnoremap', ['t', 's'], 'call call('
|
||||||
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
|
\ . string(s:_function('s:toggle_syntax_checker')) . ', [])',
|
||||||
\ 'toggle syntax checker', 1)
|
\ 'toggle syntax checker', 1)
|
||||||
augroup SpaceVim_layer_checker
|
augroup SpaceVim_layer_checker
|
||||||
autocmd!
|
autocmd!
|
||||||
if g:spacevim_enable_neomake
|
if g:spacevim_enable_neomake
|
||||||
autocmd User NeomakeFinished nested
|
if SpaceVim#layers#isLoaded('core#statusline')
|
||||||
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
|
autocmd User NeomakeFinished nested
|
||||||
|
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
|
||||||
|
endif
|
||||||
if s:show_cursor_error
|
if s:show_cursor_error
|
||||||
" when move cursor, the error message will be shown below current line
|
" when move cursor, the error message will be shown below current line
|
||||||
" after a delay
|
" after a delay
|
||||||
@ -95,7 +97,7 @@ function! SpaceVim#layers#checkers#config() abort
|
|||||||
autocmd InsertEnter,WinLeave * call <SID>neomake_signatures_clear()
|
autocmd InsertEnter,WinLeave * call <SID>neomake_signatures_clear()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
elseif g:spacevim_enable_ale
|
elseif g:spacevim_enable_ale && SpaceVim#layers#isLoaded('core#statusline')
|
||||||
autocmd User ALELint
|
autocmd User ALELint
|
||||||
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
|
\ let &l:statusline = SpaceVim#layers#core#statusline#get(1)
|
||||||
endif
|
endif
|
||||||
@ -150,9 +152,9 @@ function! s:verify_syntax_setup() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:toggle_syntax_checker() abort
|
function! s:toggle_syntax_checker() abort
|
||||||
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
|
call SpaceVim#layers#core#statusline#toggle_section('syntax checking')
|
||||||
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
|
call SpaceVim#layers#core#statusline#toggle_mode('syntax-checking')
|
||||||
verbose NeomakeToggle
|
verbose NeomakeToggle
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:error_transient_state() abort
|
function! s:error_transient_state() abort
|
||||||
|
@ -17,7 +17,7 @@ function! SpaceVim#layers#ui#plugins() abort
|
|||||||
\ ['t9md/vim-choosewin', {'merged' : 0}],
|
\ ['t9md/vim-choosewin', {'merged' : 0}],
|
||||||
\ ['mhinz/vim-startify', {'loadconf' : 1, '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,
|
call add(plugins, ['vim-airline/vim-airline', { 'merged' : 0,
|
||||||
\ 'loadconf' : 1}])
|
\ 'loadconf' : 1}])
|
||||||
call add(plugins, ['vim-airline/vim-airline-themes', { 'merged' : 0}])
|
call add(plugins, ['vim-airline/vim-airline-themes', { 'merged' : 0}])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user