mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:22:53 +08:00
Add vista.vim (https://github.com/liuchengxu/vista.vim) integration
This commit is contained in:
parent
28cd6253e9
commit
28dcb68bf3
|
@ -213,6 +213,11 @@ function! airline#extensions#load()
|
|||
call add(s:loaded_ext, 'tagbar')
|
||||
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)
|
||||
\ && exists(':BookmarkToggle')
|
||||
call airline#extensions#bookmark#init(s:ext)
|
||||
|
|
14
autoload/airline/extensions/vista.vim
Normal file
14
autoload/airline/extensions/vista.vim
Normal 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
|
|
@ -166,7 +166,7 @@ function! airline#init#bootstrap()
|
|||
\ 'ycm_error_count', 'ycm_warning_count', 'neomake_error_count',
|
||||
\ 'neomake_warning_count', 'ale_error_count', 'ale_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('capslock', '')
|
||||
call airline#parts#define_text('gutentags', '')
|
||||
|
@ -200,7 +200,7 @@ function! airline#init#sections()
|
|||
let g:airline_section_gutter = airline#section#create(['%='])
|
||||
endif
|
||||
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
|
||||
if !exists('g:airline_section_y')
|
||||
let g:airline_section_y = airline#section#create_right(['ffenc'])
|
||||
|
|
|
@ -1167,6 +1167,12 @@ virtualenv <https://github.com/jmcantrell/vim-virtualenv>
|
|||
* enable/disable virtualenv integration >
|
||||
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*
|
||||
* enable/disable detection of whitespace errors. >
|
||||
let g:airline#extensions#whitespace#enabled = 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user