feat(gitsigns): new keymap for Gitsigns blame

Also add filetype `gitsigns.blame` to autocmd `lazyvim_close_with_q`
and workaround for `+hunks` group name to show prefix correctly.
If you don't like the workaround for `+hunks` group name feel free
to remove it.
This commit is contained in:
Iordanis Petkakis 2024-06-21 17:31:48 +03:00
parent dde4a9dcdf
commit 0237e4cadb
2 changed files with 3 additions and 1 deletions

View file

@ -67,6 +67,7 @@ vim.api.nvim_create_autocmd("FileType", {
"neotest-summary",
"neotest-output-panel",
"dbout",
"gitsigns.blame",
},
callback = function(event)
vim.bo[event.buf].buflisted = false

View file

@ -177,7 +177,7 @@ return {
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>gh"] = { name = "+hunks", ["_"] = "which_key_ignore" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
@ -226,6 +226,7 @@ return {
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>ghp", gs.preview_hunk_inline, "Preview Hunk Inline")
map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "<leader>ghB", function() gs.blame() end, "Blame Buffer")
map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")