mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-22 21:45:06 +02:00
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:
parent
0a7e1bc475
commit
26f922753a
@ -21,19 +21,11 @@ function! airline#extensions#coc#get(type) abort
|
|||||||
endif
|
endif
|
||||||
let _backup = get(g:, 'coc_stl_format', '')
|
let _backup = get(g:, 'coc_stl_format', '')
|
||||||
let is_err = (a:type is# 'error')
|
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', {})
|
let info = get(b:, 'coc_diagnostic_info', {})
|
||||||
if empty(info) | return '' | endif
|
if empty(info) | return '' | endif
|
||||||
|
|
||||||
|
|
||||||
let cnt = get(info, a:type, 0)
|
let cnt = get(info, a:type, 0)
|
||||||
if !empty(_backup)
|
|
||||||
let g:coc_stl_format = _backup
|
|
||||||
endif
|
|
||||||
|
|
||||||
if empty(cnt)
|
if empty(cnt)
|
||||||
return ''
|
return ''
|
||||||
|
@ -636,12 +636,6 @@ coc <https://github.com/neoclide/coc.nvim>
|
|||||||
* change warning symbol: >
|
* change warning symbol: >
|
||||||
let airline#extensions#coc#warning_symbol = 'W:'
|
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*
|
------------------------------------- *airline-commandt*
|
||||||
command-t <https://github.com/wincent/command-t>
|
command-t <https://github.com/wincent/command-t>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user