diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 4a2110e..8f16d26 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then if vim.v.shell_error ~= 0 then vim.api.nvim_echo({ { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, + { out, "WarningMsg" }, { "\nPress any key to exit..." }, }, true, {}) vim.fn.getchar() @@ -30,6 +30,8 @@ require("lazy").setup({ colorscheme = "catppuccin-mocha", }, }, + -- Import LazyVim extras for the picker + { import = "lazyvim.plugins.extras.editor.telescope" }, -- Import LazyVim extras for languages { import = "lazyvim.plugins.extras.lang.go" }, { import = "lazyvim.plugins.extras.lang.json" }, diff --git a/lua/plugins/editor.lua b/lua/plugins/editor.lua index 7392c8f..327ddb4 100644 --- a/lua/plugins/editor.lua +++ b/lua/plugins/editor.lua @@ -82,6 +82,7 @@ return { { "D", group = "Database" }, { "f", group = "Find" }, { "g", group = "Git" }, + { "gx", group = "Conflict" }, { "o", group = "Overseer" }, { "s", group = "Search / Symbols" }, { "t", group = "Test" }, diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index 6c2c0e7..d924fdb 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -12,4 +12,67 @@ return { }, }, }, + { + "madmaxieee/unclash.nvim", + lazy = false, + opts = { + action_buttons = { + enabled = true, + }, + annotations = { + enabled = true, + }, + }, + keys = { + { + "]x", + function() + require("unclash").next_conflict() + end, + desc = "Next Conflict", + }, + { + "[x", + function() + require("unclash").prev_conflict() + end, + desc = "Prev Conflict", + }, + { + "gxc", + function() + require("unclash").accept_current() + end, + desc = "Accept Current (Conflict)", + }, + { + "gxi", + function() + require("unclash").accept_incoming() + end, + desc = "Accept Incoming (Conflict)", + }, + { + "gxb", + function() + require("unclash").accept_both() + end, + desc = "Accept Both (Conflict)", + }, + { + "gxm", + function() + require("unclash").open_merge_editor() + end, + desc = "Open Merge Editor (Conflict)", + }, + { + "gxp", + function() + require("unclash.snacks").pick() + end, + desc = "Pick Conflicts (Snacks)", + }, + }, + }, }