Add lazygit
diff --git a/src/apps/personal/git.nix b/src/apps/personal/git.nix
index b3cd59c..e0cb0e2 100644
--- a/src/apps/personal/git.nix
+++ b/src/apps/personal/git.nix
@@ -22,6 +22,15 @@
git stash push \"$@\" && \
git reset --quiet --soft HEAD~1;
}; f''; # https://stackoverflow.com/a/60875082/12293760
+ gui = ''
+ !f() {
+ export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
+ lazygit "$@"
+ if [ -f $LAZYGIT_NEW_DIR_FILE ]; then
+ cd "$(cat $LAZYGIT_NEW_DIR_FILE)"
+ rm -f $LAZYGIT_NEW_DIR_FILE > /dev/null
+ fi
+ }; f'';
};
extraConfig = {
@@ -42,5 +51,6 @@
home.packages = [
pkgs.git-review
+ pkgs.lazygit
];
}
diff --git a/src/apps/personal/vim.nix b/src/apps/personal/vim.nix
index 7f97a7a..b8f7ac2 100644
--- a/src/apps/personal/vim.nix
+++ b/src/apps/personal/vim.nix
@@ -64,6 +64,8 @@
let g:airline#extensions#hunks#coc_git = 1
let g:airline#extensions#whitespace#enabled = 1
+ nnoremap <silent> <leader>gg :LazyGit<CR>
+
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap <leader>1 <Plug>AirlineSelectTab1
nmap <leader>2 <Plug>AirlineSelectTab2
@@ -222,6 +224,7 @@
pkgs.vimPlugins.ctrlp-vim
pkgs.vimPlugins.vim-airline-clock
pkgs.vimPlugins.vim-airline-themes
+ pkgs.vimPlugins.lazygit-nvim
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))
];
};