feat(nvim): add neogit

chezmoi
sgoudham 2 years ago
parent b2f1597540
commit d3ff26f682
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -13,6 +13,7 @@ return {
term_colors = true,
no_italic = true,
integrations = {
neogit = true,
mason = true,
native_lsp = { enabled = true },
navic = {
@ -52,7 +53,11 @@ return {
TelescopeTitle = { fg = cp.subtext0 },
QuickScopePrimary = { fg = cp.red },
QuickScopeSecondary = { fg = cp.peach },
-- MiniIndentscopeSymbol = { fg = cp.blue },
DapStoppedLinehl = { bg = "#324430" },
DapBreakpointLinehl = { bg = "#492a32" },
NeogitDiffContextHighlight = { bg = "NONE" }
},
})
vim.cmd.colorscheme("catppuccin")

@ -1,6 +1,7 @@
return {
{
"lewis6991/gitsigns.nvim",
priority = 500,
config = function()
require("gitsigns").setup({
on_attach = function(bufnr)
@ -35,6 +36,7 @@ return {
end, { expr = true }, "Previous Hunk")
-- Actions
map({ "n", "v" }, "<leader>gg", ":Neogit<CR>", {}, "Open Git")
map({ "n", "v" }, "<leader>gs", ":Gitsigns stage_hunk<CR>", {}, "Stage Hunk")
map({ "n", "v" }, "<leader>gr", ":Gitsigns reset_hunk<CR>", {}, "Reset Hunk")
map("n", "<leader>gS", gs.stage_buffer, {}, "Stage Buffer")
@ -45,10 +47,10 @@ return {
gs.blame_line({ full = true })
end, {}, "Show Blame")
map("n", "<leader>gb", gs.toggle_current_line_blame, {}, "Current Line Blame")
map("n", "<leader>gd", gs.diffthis, {}, "Diff This")
map("n", "<leader>gD", function()
gs.diffthis("~")
end, {}, "")
-- map("n", "<leader>gd", gs.diffthis, {}, "Diff This")
-- map("n", "<leader>gD", function()
-- gs.diffthis("~")
-- end, {}, "")
map("n", "<leader>gd", gs.toggle_deleted, {}, "Show Deleted")
-- Text object

@ -0,0 +1,7 @@
return {
{
"TimUntersberger/neogit",
config = true,
dependencies = { "nvim-lua/plenary.nvim" },
},
}
Loading…
Cancel
Save