diff --git a/lua/config/remap.lua b/lua/config/remap.lua index d082a41..eb68f85 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -57,6 +57,13 @@ map("n", "gdx", "DiffviewClose", { desc = "Git diff view close" map("n", "gh", "Gitsigns preview_hunk_inline", { desc = "Git preview hunk inline" }) map("n", "gtb", "Gitsigns toggle_current_line_blame", { desc = "Git toggle line blame" }) map("n", "gtd", "Gitsigns toggle_deleted", { desc = "Git toggle deleted" }) +map("n", "gco", "GitConflictChooseOurs", { desc = "Git conflict resolve ours" }) +map("n", "gct", "GitConflictChooseTheirs", { desc = "Git conflict resolve theirs" }) +map("n", "gcb", "GitConflictChooseBoth", { desc = "Git conflict resolve both" }) +map("n", "gcn", "GitConflictChooseNone", { desc = "Git conflict resolve none" }) +map("n", "gcq", "GitConflictListQf", { desc = "Git conflicts to quickfix" }) +map("n", "]c", "GitConflictNextConflict", { desc = "Git conflicts find next" }) +map("n", "[c", "GitConflictPrevConflict", { desc = "Git conflicts find prev" }) -- lazygit map("n", "gg", function() diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index 32aa2e1..68593cd 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -11,6 +11,22 @@ return { { "tpope/vim-fugitive" }, + { + 'akinsho/git-conflict.nvim', + version = "*", + opts = { + default_mappings = true, -- disable buffer local mapping created by this plugin + default_commands = true, -- disable commands created by this plugin + disable_diagnostics = false, -- This will disable the diagnostics in a buffer whilst it is conflicted + list_opener = 'copen', + highlights = { + incoming = 'DiffAdd', + current = 'DiffText', + } + }, + config = true + } + -- { -- -- dir = "~/Documents/Code/monkey-alert.nvim", -- "dqnid/monkey-alert.nvim",