mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 01:00:05 +08:00
perf(tagbar): use tagbar logger for warning msg
This commit is contained in:
parent
c2e4697ed7
commit
53e568dab3
4
bundle/tagbar/autoload/tagbar.vim
vendored
4
bundle/tagbar/autoload/tagbar.vim
vendored
@ -29,7 +29,7 @@ if exists(':Tagbar') == 0
|
||||
endif
|
||||
|
||||
if exists(':Tagbar') == 0
|
||||
echomsg 'Tagbar: Could not load plugin code, check your runtimepath!'
|
||||
call tagbar#log#warn('Could not load plugin code, check your runtimepath!')
|
||||
finish
|
||||
endif
|
||||
|
||||
@ -39,7 +39,7 @@ redir => s:ftype_out
|
||||
silent filetype
|
||||
redir END
|
||||
if s:ftype_out !~# 'detection:ON'
|
||||
echomsg 'Tagbar: Filetype detection is turned off, skipping plugin'
|
||||
call tagbar#log#warn('Filetype detection is turned off, skipping plugin')
|
||||
unlet s:ftype_out
|
||||
finish
|
||||
endif
|
||||
|
6
bundle/tagbar/autoload/tagbar/log.vim
vendored
6
bundle/tagbar/autoload/tagbar/log.vim
vendored
@ -32,6 +32,12 @@ function! tagbar#log#info(msg) abort
|
||||
call s:LOGGER.info(a:msg)
|
||||
endfunction
|
||||
|
||||
function! tagbar#log#warn(msg) abort
|
||||
|
||||
call s:LOGGER.warn(a:msg)
|
||||
|
||||
endfunction
|
||||
|
||||
function! tagbar#log#debug_enabled() abort
|
||||
return s:LOGGER.debug_enabled()
|
||||
endfunction
|
||||
|
17
bundle/tagbar/plugin/tagbar.vim
vendored
17
bundle/tagbar/plugin/tagbar.vim
vendored
@ -27,18 +27,14 @@ endif
|
||||
" Basic init {{{1
|
||||
|
||||
if v:version < 700
|
||||
echohl WarningMsg
|
||||
echomsg 'Tagbar: Vim version is too old, Tagbar requires at least 7.0'
|
||||
echohl None
|
||||
call tagbar#log#warn('Vim version is too old, Tagbar requires at least 7.0')
|
||||
finish
|
||||
endif
|
||||
|
||||
if v:version == 700 && !has('patch167')
|
||||
echohl WarningMsg
|
||||
echomsg 'Tagbar: Vim versions lower than 7.0.167 have a bug'
|
||||
\ 'that prevents this version of Tagbar from working.'
|
||||
\ 'Please use the alternate version posted on the website.'
|
||||
echohl None
|
||||
call tagbar#log#warn('Vim versions lower than 7.0.167 have a bug')
|
||||
call tagbar#log#warn('that prevents this version of Tagbar from working.')
|
||||
call tagbar#log#warn('Please use the alternate version posted on the website.')
|
||||
finish
|
||||
endif
|
||||
|
||||
@ -183,7 +179,6 @@ augroup TagbarSession
|
||||
autocmd SessionLoadPost * nested call tagbar#RestoreSession()
|
||||
augroup END
|
||||
|
||||
" Commands {{{1
|
||||
command! -nargs=? Tagbar call tagbar#ToggleWindow(<f-args>)
|
||||
command! -nargs=? TagbarToggle call tagbar#ToggleWindow(<f-args>)
|
||||
command! -nargs=? TagbarOpen call tagbar#OpenWindow(<f-args>)
|
||||
@ -200,7 +195,3 @@ command! -nargs=0 TagbarForceUpdate call tagbar#ForceUpdate()
|
||||
command! -nargs=0 TagbarJump call tagbar#jump()
|
||||
command! -nargs=0 TagbarJumpPrev call tagbar#jumpToNearbyTag(-1)
|
||||
command! -nargs=0 TagbarJumpNext call tagbar#jumpToNearbyTag(1)
|
||||
|
||||
|
||||
" Modeline {{{1
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
|
Loading…
Reference in New Issue
Block a user