Skip to content

A lua plugin for neovim that shows git-status on the top of the editor.

Notifications You must be signed in to change notification settings

kyoh86/gitstat.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gitstat.nvim

Deprecated: We can use winbar and laststatus=3 instead.

A lua plugin for neovim that shows git-status on the top of the editor.

gitstat

Setup

You can configure this plugin with "setup" function. It accepts options and also having default values like below.

require('gitstat').setup({
    -- Ordered parts which you want to show.
    parts = {
        "branch",
        "remote",
        "ahead",
        "behind",
        "recruit",
        "unmerged",
        "staged",
        "unstaged",
        "untracked",
    },

    -- A table of prefixes for each part.
    prefix = {
        branch = "\u{F418} ", --  .
        remote = "\u{F427} ", --  .
        ahead = "\u{F55D} ", --  .
        behind = "\u{F545} ", --  .
        recruit = "\u{F6C8} ", --  .
        unmerged = "\u{FBC2} ", -- ﯂ .
        staged = "\u{F00C} ", --  .
        unstaged = "\u{F067} ", --  .
        untracked = "\u{F12A} ", --  .
    },

    -- A table of styles like |nvim_set_hl()| for each part.
    style = {
        branch = { bg = "Green", fg = "Black" },
        remote = { bg = "Green", fg = "Black" },
        ahead = { bg = "Yellow", fg = "Black" },
        behind = { bg = "Yellow", fg = "Black" },
        recruit = { bg = "Yellow", fg = "Black" },
        unmerged = { bg = "Yellow", fg = "Black" },
        staged = { bg = "Yellow", fg = "Black" },
        unstaged = { bg = "Yellow", fg = "Black" },
        untracked = { bg = "Yellow", fg = "Black" },
    },

    -- 'winblend' of the window for gitstat.
    blend = 20,
})

Show

You should call a "show" function to see git status window.

require("gitstat").show()

Commands

  • GitStatClose / lua require('gitstat').hide()
  • GitStatShow / lua require('gitstat').show()
  • GitStatUpdate / lua require('gitstat').update()

About

A lua plugin for neovim that shows git-status on the top of the editor.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages