Merge pull request #2458 from fritzlolpro/patch-1

Allow user to hide CoC status in the section C
This commit is contained in:
Christian Brabandt 2021-11-10 11:24:50 +01:00 committed by GitHub
commit 70904d7070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ 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:')
let s:show_coc_status = get(g:, 'airline#extensions#coc#show_coc_status', 1)
function! airline#extensions#coc#get_warning() abort
return airline#extensions#coc#get('warning')
@ -37,7 +38,8 @@ endfunction
function! airline#extensions#coc#get_status() abort
" Shorten text for windows < 91 characters
return airline#util#shorten(get(g:, 'coc_status', ''), 91, 9)
let status = airline#util#shorten(get(g:, 'coc_status', ''), 91, 9)
return (s:show_coc_status ? status : '')
endfunction
function! airline#extensions#coc#get_current_function() abort

View File

@ -636,6 +636,9 @@ coc <https://github.com/neoclide/coc.nvim>
* change warning symbol: >
let airline#extensions#coc#warning_symbol = 'W:'
<
* enable/disable coc status display >
g:airline#extensions#coc#show_coc_status = 1
<
------------------------------------- *airline-commandt*
command-t <https://github.com/wincent/command-t>