Closed mintelm closed 4 years ago
Can't find where I got the initial rendition of this, but: https://gitlab.com/polyzen/dotfiles/blob/dce37955a745ee23efd247306781f8bc4a4d62bc/base/.vim/vimrc#L158
Thanks @polyzen.
The function GitGutterGetHunkSummary()
is the one you want to call. I realise now that while it's commented in the code, it's not documented in the README or help file – sorry about that.
Anyway, @polyzen's code works and here is a similar solution modelled on niklaas/lightline-gitdiff.
Hi,
I am trying to integrate vim-gitgutter in lightline and I'm having trouble to find the right function to call to show Additions, Deletions and Modified in my statusline.
lightline wiki suggests to integrate other plugins as follows:
let g:lightline = { \ 'colorscheme': 'wombat', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] \ }, \ 'component_function': { \ 'gitbranch': 'fugitive#head' \ }, \ }
Following this, I tried to create a component_function named gitgutterdiff but I am not sure which gitgutter function to call, I have found gitgutter#diff but I don't think it's the right one to call.
Can you help me with this?