Add fugitive, remove git bindings from telescope, add git bindings for git signs (line blame and line preview)

This commit is contained in:
Martin Larsson 2024-06-06 01:21:05 +02:00
parent de34f66995
commit a42c3175c2
2 changed files with 18 additions and 33 deletions

View file

@ -0,0 +1,18 @@
return {
"tpope/vim-fugitive",
config = function()
require("utils").add_keymaps({
n = {
["<leader>gp"] = {
cmd = ":Gitsigns preview_hunk_inline<CR>",
},
["<leader>gt"] = {
cmd = ":Gitsigns toggle_current_line_blame<CR>",
},
["<leader>gb"] = {
cmd = ":Git blame<CR>",
}
}
})
end
}

View file

@ -107,39 +107,6 @@ return {
builtin.live_grep(dropdown_theme)
end,
},
-- Git
["<leader>gl"] = {
cmd = function()
dropdown_theme.prompt_prefix = "Log>"
dropdown_theme.previewer = true
dropdown_theme.find_command = nil
builtin.git_commits(dropdown_theme)
end,
},
["<leader>gs"] = {
cmd = function()
dropdown_theme.prompt_prefix = "Status>"
dropdown_theme.previewer = true
dropdown_theme.find_command = nil
builtin.git_status(dropdown_theme)
end,
},
["<leader>gh"] = {
cmd = function()
dropdown_theme.prompt_prefix = "History>"
dropdown_theme.previewer = true
dropdown_theme.find_command = nil
builtin.git_bcommits(dropdown_theme)
end,
},
["<leader>gb"] = {
cmd = function()
dropdown_theme.prompt_prefix = "Branches>"
dropdown_theme.previewer = true
dropdown_theme.find_command = nil
builtin.git_branches(dropdown_theme)
end,
},
-- Misc
["<leader>tb"] = {
cmd = function()