Merge pull request #296 from xinleibird/project_tree

Add a simple eclim's ProjectTree status line
This commit is contained in:
Bailey Ling 2013-10-02 11:21:15 -07:00
commit 008eb8cd3b

View File

@ -5,6 +5,16 @@ if !exists(':ProjectCreate')
finish finish
endif endif
function! airline#extensions#eclim#creat_line(...)
if &filetype == "tree"
let builder = a:1
call builder.add_section('airline_a', ' Project ')
call builder.add_section('airline_b', ' %f ')
call builder.add_section('airline_c', '')
return 1
endif
endfunction
function! airline#extensions#eclim#get_warnings() function! airline#extensions#eclim#get_warnings()
let eclimList = eclim#display#signs#GetExisting() let eclimList = eclim#display#signs#GetExisting()
if !empty(eclimList) if !empty(eclimList)
@ -20,4 +30,6 @@ endfunction
function! airline#extensions#eclim#init(ext) function! airline#extensions#eclim#init(ext)
call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings') call airline#parts#define_function('eclim', 'airline#extensions#eclim#get_warnings')
call a:ext.add_statusline_func('airline#extensions#eclim#creat_line')
endfunction endfunction