Setup unclash.nvim

This commit is contained in:
2026-03-21 23:18:55 +01:00
parent 1824f9a519
commit b0fb300dbb
4 changed files with 17 additions and 15 deletions
+3
View File
@@ -31,6 +31,9 @@
"closest_bookmark(to)" = "heads(::to & bookmarks())";
"closest_pushable(to)" = ''heads(::to & mutable() & ~description(exact:" ") & (~empty() | merges()))'';
};
ui = {
conflict-marker-style = "git";
};
};
};
}
+1
View File
@@ -69,6 +69,7 @@
jsp = "jj split";
jspi = "jj split -i";
jt = "jj tug";
ju = "jj undo";
# k8s
k = "kubectl";
+1 -1
View File
@@ -79,7 +79,7 @@ in
jj-nvim
vim-fugitive
vim-rhubarb
git-conflict-nvim
unclash-nvim
nvim-surround
mini-operators
+12 -14
View File
@@ -65,22 +65,20 @@ return {
},
{
"git-conflict.nvim",
"unclash.nvim",
-- load on enter to detect + highlight conflicts
-- lazy loading make it not work, idk why
-- event = { "BufReadPost", "BufWritePost", "BufNewFile" },
opts = {
default_mappings = {
ours = 'c<',
theirs = 'c>',
none = 'cd',
both = 'c=',
next = ']x',
prev = '[x',
},
},
opts = { },
after = function(plug)
require("git-conflict").setup(plug.opts)
require("unclash").setup(plug.opts)
local unclash = require("unclash")
vim.keymap.set("n", "]x", unclash.next_conflict, { desc = "Next Conflict" })
vim.keymap.set("n", "[x", unclash.prev_conflict, { desc = "Prev Conflict" })
vim.keymap.set("n", "co", unclash.open_merge_editor, { desc = "Open Merge Editor" })
vim.keymap.set("n", "c<", unclash.accept_current, { desc = "Accept Current" })
vim.keymap.set("n", "c>", unclash.accept_incoming, { desc = "Accept Incoming" })
vim.keymap.set("n", "c=", unclash.accept_both, { desc = "Accept Both" })
vim.keymap.set("n", "<leader>x", "<cmd>UnclashQf<cr>", { desc = "Add conflicts in qf" })
end
},