41 lines
1.3 KiB
Lua
41 lines
1.3 KiB
Lua
return {
|
|
{
|
|
"tpope/vim-fugitive",
|
|
},
|
|
{
|
|
"lewis6991/gitsigns.nvim",
|
|
tag = "v1.0.2",
|
|
config = function()
|
|
require("gitsigns").setup({
|
|
current_line_blame = true,
|
|
})
|
|
-- Configure Git
|
|
vim.keymap.set("n", "<leader>gd", ":Gitsigns preview_hunk<CR>", { desc = "Git Diff" })
|
|
vim.keymap.set("n", "<leader>gb", ":Gitsigns toggle_current_line_blame<CR>", { desc = "Git Blame" })
|
|
vim.keymap.set("n", "<leader>gs", ":Gitsigns stage_hunk<CR>", { desc = "Git Stage Hunk" })
|
|
vim.keymap.set("n", "<leader>gr", ":Gitsigns reset_hunk<CR>", { desc = "Git Reset Hunk" })
|
|
vim.keymap.set("n", "<leader>gn", ":Gitsigns next_hunk<CR>", { desc = "Git Next Hunk" })
|
|
vim.keymap.set("n", "<leader>gp", ":Gitsigns prev_hunk<CR>", { desc = "Git Previous Hunk" })
|
|
end,
|
|
},
|
|
{
|
|
"kdheepak/lazygit.nvim",
|
|
lazy = true,
|
|
cmd = {
|
|
"LazyGit",
|
|
"LazyGitConfig",
|
|
"LazyGitCurrentFile",
|
|
"LazyGitFilter",
|
|
"LazyGitFilterCurrentFile",
|
|
},
|
|
-- optional for floating window border decoration
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
|
-- order to load the plugin when the command is run for the first time
|
|
keys = {
|
|
{ "<leader>gv", "<cmd>LazyGit<cr>", desc = "LazyGit View" },
|
|
},
|
|
},
|
|
}
|