mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 08:20:06 +08:00
feat(neoformat): use spacevim log api
This commit is contained in:
parent
97be6c3215
commit
7347ec4bff
17
bundle/neoformat/autoload/neoformat/utils.vim
vendored
17
bundle/neoformat/autoload/neoformat/utils.vim
vendored
@ -1,7 +1,16 @@
|
|||||||
|
"=============================================================================
|
||||||
|
" utils.vim --- utils function for neoformat
|
||||||
|
" Copyright (c) 2016-2019 Wang Shidong & Contributors
|
||||||
|
" Author: Wang Shidong < wsdjeg@outlook.com >
|
||||||
|
" URL: https://spacevim.org
|
||||||
|
" License: GPLv3
|
||||||
|
"=============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
let s:LOGGER =SpaceVim#logger#derive('neoformat')
|
||||||
|
|
||||||
function! neoformat#utils#log(msg) abort
|
function! neoformat#utils#log(msg) abort
|
||||||
if neoformat#utils#should_be_verbose()
|
call s:LOGGER.info(a:msg)
|
||||||
return s:better_echo(a:msg)
|
|
||||||
endif
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! neoformat#utils#log_file_content(path) abort
|
function! neoformat#utils#log_file_content(path) abort
|
||||||
@ -11,7 +20,7 @@ function! neoformat#utils#log_file_content(path) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! neoformat#utils#warn(msg) abort
|
function! neoformat#utils#warn(msg) abort
|
||||||
echohl WarningMsg | call s:better_echo(a:msg) | echohl NONE
|
call s:LOGGER.warn(a:msg)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! neoformat#utils#msg(msg) abort
|
function! neoformat#utils#msg(msg) abort
|
||||||
|
Loading…
Reference in New Issue
Block a user