Add fugitive, remove git bindings from telescope, add git bindings for git signs (line blame and line preview)
This commit is contained in:
parent
de34f66995
commit
a42c3175c2
2 changed files with 18 additions and 33 deletions
18
home/.config/nvim/lua/plugs/fugitive.lua
Normal file
18
home/.config/nvim/lua/plugs/fugitive.lua
Normal 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
|
||||
}
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue