feat(gitsigns): new keymap for Gitsigns blame
(#3758)
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. ## What is this PR for? Make use of the new `gitsigns` feature `Gitsigns blame`, which shows in a vertical buffer split the `blame` history of the whole buffer. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Does this PR fix an existing issue? No. <!-- If this PR fixes any issues, please link to the issue here. Fixes #<issue_number> --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:

committed by
GitHub

parent
dde4a9dcdf
commit
b22831b7e2
@ -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
|
||||
|
@ -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")
|
||||
|
Reference in New Issue
Block a user