coc-extension: remove dead code

vim-airline does not use actually use the `g:coc_stl_format` variable
and it also doesn't seem to be used by coc itself. So let's just remove
this code.

closes #2437
This commit is contained in:
Christian Brabandt 2021-09-21 08:41:10 +02:00
parent 0a7e1bc475
commit 26f922753a
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 0 additions and 14 deletions

View File

@ -21,19 +21,11 @@ function! airline#extensions#coc#get(type) abort
endif
let _backup = get(g:, 'coc_stl_format', '')
let is_err = (a:type is# 'error')
if is_err
let g:coc_stl_format = get(g:, 'airline#extensions#coc#stl_format_err', '%E{[%e(#%fe)]}')
else
let g:coc_stl_format = get(g:, 'airline#extensions#coc#stl_format_warn', '%W{[%w(#%fw)]}')
endif
let info = get(b:, 'coc_diagnostic_info', {})
if empty(info) | return '' | endif
let cnt = get(info, a:type, 0)
if !empty(_backup)
let g:coc_stl_format = _backup
endif
if empty(cnt)
return ''

View File

@ -636,12 +636,6 @@ coc <https://github.com/neoclide/coc.nvim>
* change warning symbol: >
let airline#extensions#coc#warning_symbol = 'W:'
<
* change error format: >
let airline#extensions#coc#stl_format_err = '%E{[%e(#%fe)]}'
<
* change warning format: >
let airline#extensions#coc#stl_format_warn = '%W{[%w(#%fw)]}'
------------------------------------- *airline-commandt*
command-t <https://github.com/wincent/command-t>