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

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

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