Xinqi Bao's Git

refactor(nvim): use gitsigns blame and remove Fugitive
authorXinqi Bao <[email protected]>
Thu, 1 Oct 2026 17:12:53 +0000 (01:12 +0800)
committerXinqi Bao <[email protected]>
Thu, 1 Oct 2026 17:12:53 +0000 (01:12 +0800)
Open the full gitsigns blame view with Space-hb while keeping the existing hunk mappings. Keep repository-level Git work in Lazygit and the git CLI.

.config/nvim/init.vim
.config/nvim/lua/plugin-config/gitsigns.lua

index b138edb..e002a88 100644 (file)
@@ -87,7 +87,6 @@ call plug#begin()
     Plug 'zbirenbaum/copilot.lua'
 
     " Git
     Plug 'zbirenbaum/copilot.lua'
 
     " Git
-    Plug 'tpope/vim-fugitive'
     Plug 'lewis6991/gitsigns.nvim'
     Plug 'kdheepak/lazygit.nvim'
 
     Plug 'lewis6991/gitsigns.nvim'
     Plug 'kdheepak/lazygit.nvim'
 
index a2526ca..a522b9d 100644 (file)
@@ -23,7 +23,7 @@ require('gitsigns').setup({
     map('n', '<leader>hp', gs.preview_hunk)
     map('n', '<leader>hs', gs.stage_hunk)
     map('n', '<leader>hr', gs.reset_hunk)
     map('n', '<leader>hp', gs.preview_hunk)
     map('n', '<leader>hs', gs.stage_hunk)
     map('n', '<leader>hr', gs.reset_hunk)
-    map('n', '<leader>hb', function() gs.blame_line({ full = true }) end)
+    map('n', '<leader>hb', gs.blame)
     map('x', '<leader>hs', function()
       gs.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
     end)
     map('x', '<leader>hs', function()
       gs.stage_hunk({ vim.fn.line('.'), vim.fn.line('v') })
     end)