Skip to content

lightline plugin: Git hunks and git branch indicators for Lightline

License

Notifications You must be signed in to change notification settings

sineto/lightline-hunks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

lightline-hunks

This plugin provides git hunks and git branch for lightline.

Requirements

Installation

Use a plugin manager you want, like vim-plug:

Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'sinetoami/lightline-hunks'

Run :so % and :PlugInstall.

Configurations

Set to lightline status

  1. Register the components:
let g:lightline.component_function = {
  \  'lightline_hunks': 'lightline#hunks#composer',
  \ }
  1. Add the component to the lightline:
let g:lightline.active = { 'left': [['lightline_hunks']] }

Global Variables

g:lightline#hunks#branch_symbol

Symbol visible to the left of the branch. Default is .

g:lightline#hunks#hunk_symbols

Hunk count symbols. Default is ['+', '~', '-'] to added, changed and deleted respectivelly.

Example:
let g:lightline#hunks#hunk_symbols = [ 'A:', 'M:', 'R:' ]

g:lightline#hunks#exclude_filetypes

Prevent certain filetypes from showing Git information. Default is [].

Example:
let g:lightline#hunks#exclude_filetypes = [ 'startify', 'nerdtree', 'vista_kind', 'tagbar' ]

g:lightline#hunks#only_branch

When set with 1 will shows only branch name and symbol. Default is 0.

Example:
let g:lightline#hunks#only_branch = 1

License

MIT License

About

lightline plugin: Git hunks and git branch indicators for Lightline

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published