This commit is contained in:
shmaryar 2019-07-01 09:18:33 +03:00 committed by Christian Brabandt
parent 28cd6253e9
commit 28dcb68bf3
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
4 changed files with 27 additions and 2 deletions

View File

@ -213,6 +213,11 @@ function! airline#extensions#load()
call add(s:loaded_ext, 'tagbar') call add(s:loaded_ext, 'tagbar')
endif endif
if get(g:, 'airline#extensions#vista#enabled', 1)
call airline#extensions#vista#init(s:ext)
call add(s:loaded_ext, 'vista')
endif
if get(g:, 'airline#extensions#bookmark#enabled', 1) if get(g:, 'airline#extensions#bookmark#enabled', 1)
\ && exists(':BookmarkToggle') \ && exists(':BookmarkToggle')
call airline#extensions#bookmark#init(s:ext) call airline#extensions#bookmark#init(s:ext)

View File

@ -0,0 +1,14 @@
" MIT License. Copyright (c) 2019 s1341 (github@shmarya.net)
" vim: et ts=2 sts=2 sw=2
scriptencoding utf-8
function! airline#extensions#vista#currenttag()
if get(w:, 'airline_active', 0)
return get(b:, 'vista_nearest_method_or_function', '')
endif
endfunction
function! airline#extensions#vista#init(ext)
call airline#parts#define_function('vista', 'airline#extensions#vista#currenttag')
endfunction

View File

@ -166,7 +166,7 @@ function! airline#init#bootstrap()
\ 'ycm_error_count', 'ycm_warning_count', 'neomake_error_count', \ 'ycm_error_count', 'ycm_warning_count', 'neomake_error_count',
\ 'neomake_warning_count', 'ale_error_count', 'ale_warning_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']) \ 'coc_warning_count', 'coc_error_count', 'vista'])
call airline#parts#define_text('bookmark', '') call airline#parts#define_text('bookmark', '')
call airline#parts#define_text('capslock', '') call airline#parts#define_text('capslock', '')
call airline#parts#define_text('gutentags', '') call airline#parts#define_text('gutentags', '')
@ -200,7 +200,7 @@ function! airline#init#sections()
let g:airline_section_gutter = airline#section#create(['%=']) let g:airline_section_gutter = airline#section#create(['%='])
endif endif
if !exists('g:airline_section_x') if !exists('g:airline_section_x')
let g:airline_section_x = airline#section#create_right(['bookmark', 'tagbar', 'gutentags', 'grepper', 'filetype']) let g:airline_section_x = airline#section#create_right(['bookmark', 'tagbar', 'vista', 'gutentags', 'grepper', 'filetype'])
endif endif
if !exists('g:airline_section_y') if !exists('g:airline_section_y')
let g:airline_section_y = airline#section#create_right(['ffenc']) let g:airline_section_y = airline#section#create_right(['ffenc'])

View File

@ -1167,6 +1167,12 @@ virtualenv <https://github.com/jmcantrell/vim-virtualenv>
* enable/disable virtualenv integration > * enable/disable virtualenv integration >
let g:airline#extensions#virtualenv#enabled = 1 let g:airline#extensions#virtualenv#enabled = 1
< <
------------------------------------- *airline-vista*
vista.vim <https://github.com/liuchngxu/vista.vim>
* enable/disable vista integration >
let g:airline#extensions#vista#enabled = 1
------------------------------------- *airline-whitespace* ------------------------------------- *airline-whitespace*
* enable/disable detection of whitespace errors. > * enable/disable detection of whitespace errors. >
let g:airline#extensions#whitespace#enabled = 1 let g:airline#extensions#whitespace#enabled = 1