aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/plugged/vim-airline/autoload/airline/extensions/gina.vim
blob: d9059f4ecd2a06f61a991aa426b98a85b67bea8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
scriptencoding utf-8
if !get(g:, 'loaded_gina', 0)
  finish
endif

function! airline#extensions#gina#apply(...) abort
  if (&ft =~# 'gina' && &ft !~# 'blame') || &ft ==# 'diff'
    call a:1.add_section('airline_a', ' gina ')
    call a:1.add_section('airline_b', ' %{gina#component#repo#branch()} ')
    call a:1.split()
    call a:1.add_section('airline_y', ' staged %{gina#component#status#staged()} ')
    call a:1.add_section('airline_z', ' unstaged %{gina#component#status#unstaged()} ')
    return 1
  endif
endfunction

function! airline#extensions#gina#init(ext) abort
  let g:gina_force_overwrite_statusline = 0
  call a:ext.add_statusline_func('airline#extensions#gina#apply')
endfunction