Dheepak Krishnamurthy 03c452202a Update README.md
2020-07-18 21:52:42 -06:00
2020-04-12 04:24:07 -06:00
2020-04-05 11:24:23 -06:00
2020-07-18 21:52:42 -06:00

lazygit.nvim

Plugin for calling lazygit from within neovim.

Install

Install using vim-plug:

" nvim v0.4.3
Plug 'kdheepak/lazygit.nvim', { 'branch': 'nvim-v0.4.3' }
" nvim nightly
Plug 'kdheepak/lazygit.nvim'

Feel free to use any plugin manager. Just remember that if you are not using neovim nightly, you will need to use this branch.

You can check what version of neovim you have:

nvim --version

Usage

The following are configuration options and their defaults.

let g:lazygit_floating_window_winblend = 0 " transparency of floating window
let g:lazygit_floating_window_scaling_factor = 0.9 " scaling factor for floating window

Call :LazyGit to start a floating window with lazygit. And set up a mapping to call :LazyGit:

" setup mapping to call :LazyGit
nnoremap <silent> <leader>lg :LazyGit<CR>

Open the configuration file for lazygit directly from vim.

:LazyGitConfig<CR>

If the file does not exist it'll load the defaults for you.

Using neovim-remote

If you have neovim-remote and have configured to use it in neovim, it'll launch the commit message inside your neovim instance.

  1. pip install neovim-remote

  2. Add the following to your ~/.bashrc:

if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
    alias nvim=nvr -cc split --remote-wait +'set bufhidden=wipe'
fi
  1. Set EDITOR environment variable in ~/.bashrc:
if [ -n "$NVIM_LISTEN_ADDRESS" ]; then
    export VISUAL="nvr -cc split --remote-wait +'set bufhidden=wipe'"
    export EDITOR="nvr -cc split --remote-wait +'set bufhidden=wipe'"
else
    export VISUAL="nvim"
    export EDITOR="nvim"
fi
  1. Add the following to ~/.vimrc:
if has('nvim') && executable('nvr')
  let $GIT_EDITOR = "nvr -cc split --remote-wait +'set bufhidden=wipe'"
endif

If you have neovim-remote and don't want lazygit.nvim to use it, you can disable it using the following configuration option:

let g:lazygit_use_neovim_remote = 0
Description
No description provided
Readme MIT 209 KiB
Languages
Lua 88.2%
Vim Script 11.8%