feat: add merge conflict UI and telescope picker #8
+3
-1
@@ -6,7 +6,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
vim.api.nvim_echo({
|
vim.api.nvim_echo({
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
{ out, "WarningMsg" },
|
{ out, "WarningMsg" },
|
||||||
{ "\nPress any key to exit..." },
|
{ "\nPress any key to exit..." },
|
||||||
}, true, {})
|
}, true, {})
|
||||||
vim.fn.getchar()
|
vim.fn.getchar()
|
||||||
@@ -30,6 +30,8 @@ require("lazy").setup({
|
|||||||
colorscheme = "catppuccin-mocha",
|
colorscheme = "catppuccin-mocha",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- Import LazyVim extras for the picker
|
||||||
|
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||||
-- Import LazyVim extras for languages
|
-- Import LazyVim extras for languages
|
||||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|||||||
@@ -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",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>co",
|
||||||
|
function()
|
||||||
|
require("unclash").open_merge_editor()
|
||||||
|
end,
|
||||||
|
desc = "Open Merge Editor",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cc",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_current()
|
||||||
|
end,
|
||||||
|
desc = "Accept Current",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>ci",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_incoming()
|
||||||
|
end,
|
||||||
|
desc = "Accept Incoming",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cb",
|
||||||
|
function()
|
||||||
|
require("unclash").accept_both()
|
||||||
|
end,
|
||||||
|
desc = "Accept Both",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fx",
|
||||||
|
function()
|
||||||
|
require("unclash.snacks").pick()
|
||||||
|
end,
|
||||||
|
desc = "Pick Conflicts",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user