Files
lazygit.nvim/ftplugin/gitcommit.vim
tobias.voelzel 4c33a74098 fix: improve git commit message via nvr
Switch to the BufUnload event for reopening LazyGit window, so that the
user can switch windows before submitting his commit message.
2022-01-14 08:24:50 +01:00

8 lines
380 B
VimL

if exists("g:lazygit_opened") && g:lazygit_opened && g:lazygit_use_neovim_remote && executable("nvr")
augroup lazygit_neovim_remote
autocmd!
autocmd BufUnload <buffer> :lua local root = require('lazygit').project_root_dir(); vim.schedule(function() require('lazygit').lazygit(root) end)
autocmd BufUnload <buffer> :let g:lazygit_opened=0
augroup END
end