Define coc functions as empty by default

fixes #1926
This commit is contained in:
Christian Brabandt 2019-05-29 21:04:32 +02:00
parent b19dc8fc65
commit 4a1ac56286
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,4 @@
scriptencoding utf-8
let s:error_symbol = get(g:, 'airline#extensions#coc#error_symbol', 'E:')
let s:warning_symbol = get(g:, 'airline#extensions#coc#warning_symbol', 'W:')
@ -11,6 +12,9 @@ function! airline#extensions#coc#get_error()
endfunction
function! airline#extensions#coc#get(type)
if !exists(":CocCommand")
return ''
endif
let _backup = get(g:, 'coc_stl_format', '')
let is_err = (a:type is# 'error')
if is_err

View File

@ -164,7 +164,8 @@ function! airline#init#bootstrap()
\ 'syntastic-err', 'eclim', 'whitespace','windowswap',
\ 'ycm_error_count', 'ycm_warning_count', 'neomake_error_count',
\ 'neomake_warning_count', 'ale_error_count', 'ale_warning_count',
\ 'languageclient_error_count', 'languageclient_warning_count'])
\ 'languageclient_error_count', 'languageclient_warning_count',
\ 'coc_warning_count', 'coc_error_count'])
call airline#parts#define_text('bookmark', '')
call airline#parts#define_text('capslock', '')
call airline#parts#define_text('gutentags', '')