mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Setup unclash.nvim
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
jsp = "jj split";
|
||||
jspi = "jj split -i";
|
||||
jt = "jj tug";
|
||||
ju = "jj undo";
|
||||
|
||||
# k8s
|
||||
k = "kubectl";
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ in
|
||||
jj-nvim
|
||||
vim-fugitive
|
||||
vim-rhubarb
|
||||
git-conflict-nvim
|
||||
unclash-nvim
|
||||
|
||||
nvim-surround
|
||||
mini-operators
|
||||
|
||||
+12
-14
@@ -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
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user