/lvim-forgit

Primary LanguageLuaBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

LVIM FORGIT - Forgit for Neovim

lvim-logo

License

Requirements

Installation

Install the plugin with your preferred package manager:

require("lazy").setup({
  {
    "lvim-tech/lvim-forgit",
    dependencies = { "lvim-tech/lvim-shell" },
    config = function()
      require("lvim-forgit").setup({
        -- your configuration comes here
        -- or leave it empty to use the default settings
        -- refer to the configuration section below
      })
    end,
  },
})
use({
  "lvim-tech/lvim-forgit",
  requires = { "lvim-tech/lvim-shell" },
  config = function()
    require("lvim-forgit").setup({
      -- your configuration comes here
      -- or leave it empty to use the default settings
      -- refer to the configuration section below
    })
  end,
})

Default configuration

{
  ui = {
    default = "float",
    float = {
      border = { " ", " ", " ", " ", " ", " ", " ", " " },
      float_hl = "Normal",
      border_hl = "FloatBorder",
      blend = 0,
      height = 1,
      width = 1,
      x = 0.5,
      y = 0.5,
    },
    split = "rightbelow new", -- `leftabove new`, `rightbelow new`, `leftabove vnew 24`, `rightbelow vnew 24`
  },
  on_close = {},
  on_open = {},
  mappings = {
    close = "<C-q>",
  },
  env = {
    FORGIT_PATH = vim.fn.fnamemodify(debug.getinfo(1, "S").source:gsub("^@", ""), ":h:h") .. "/forgit/bin",
    FORGIT_FZF_DEFAULT_OPTS = "--height='100%' --preview-window='right:50%'",
    REVERSE = "--reverse",
    ICON_MENU = "",
    ICON_POINTER = "",
    ICON_MARKER = "",
    ICON_PROMPT = "",
    ICON_SEPARATOR = "",
    KEY_QUIT = "ctrl-q",
    KEY_CLEAR_QUERY = "ctrl-c",
  },
}

Command

:LvimForgit
:LvimForgitAdd
:LvimForgitBlame
:LvimForgitBranchDelete
:LvimForgitCheckoutBranch
:LvimForgitCheckoutCommit
:LvimForgitCheckoutFile
:LvimForgitCheckoutTag
:LvimForgitCherryPick
:LvimForgitCherryPickFromBranch
:LvimForgitClean
:LvimForgitDiff
:LvimForgitFixUp
:LvimForgitIgnore
:LvimForgitLog
:LvimForgitRebase
:LvimForgitResetHead
:LvimForgitRevertCommit
:LvimForgitStashShow
:LvimForgitStashPush