From ecf64fa9aebb3c17887bbb10a6ebecd44cf33994 Mon Sep 17 00:00:00 2001 From: SunJ Date: Mon, 23 Sep 2024 11:26:51 +0800 Subject: [PATCH] sync with https://github.com/AstroNvim/astrocommunity/pull/1210 Signed-off-by: SunJ --- lua/plugins/avante.lua | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 666edd3c..754346a2 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -4,19 +4,12 @@ return { cmd = { "AvanteAsk", "AvanteBuild", - "AvanteConflictChooseAllTheirs", - "AvanteConflictChooseBase", - "AvanteConflictChooseBoth", - "AvanteConflictChooseCursor", - "AvanteConflictChooseNone", - "AvanteConflictChooseOurs", - "AvanteConflictChooseTheirs", - "AvanteConflictListQf", - "AvanteConflictNextConflict", - "AvanteConflictPrevConflict", "AvanteEdit", "AvanteRefresh", "AvanteSwitchProvider", + "AvanteChat", + "AvanteToggle", + "AvanteClear", }, dependencies = { "stevearc/dressing.nvim", @@ -39,29 +32,24 @@ return { maps.v[prefix .. "e"] = { function() require("avante.api").edit() end, desc = "Avante edit" } -- the following key bindings do not have an official api implementation - maps.n.co = { ":AvanteConflictChooseOurs", desc = "Choose ours" } - maps.v.co = { ":AvanteConflictChooseOurs", desc = "Choose ours" } + maps.n.co = { "(AvanteConflictOurs)", desc = "Choose ours", expr = true } + maps.v.co = { "(AvanteConflictOurs)", desc = "Choose ours", expr = true } - maps.n.ct = { ":AvanteConflictChooseTheirs", desc = "Choose theirs" } - maps.v.ct = { ":AvanteConflictChooseTheirs", desc = "Choose theirs" } + maps.n.ct = { "(AvanteConflictTheirs)", desc = "Choose theirs", expr = true } + maps.v.ct = { "(AvanteConflictTheirs)", desc = "Choose theirs", expr = true } - maps.n.ca = { ":AvanteConflictChooseAllTheirs", desc = "Choose all theirs" } - maps.v.ca = { ":AvanteConflictChooseAllTheirs", desc = "Choose all theirs" } + maps.n.ca = { "(AvanteConflictAllTheirs)", desc = "Choose all theirs", expr = true } + maps.v.ca = { "(AvanteConflictAllTheirs)", desc = "Choose all theirs", expr = true } - maps.n.c0 = { ":AvanteConflictChooseNone", desc = "Choose none" } - maps.v.c0 = { ":AvanteConflictChooseNone", desc = "Choose none" } + maps.n.cb = { "(AvanteConflictBoth)", desc = "Choose both", expr = true } + maps.v.cb = { "(AvanteConflictBoth)", desc = "Choose both", expr = true } - maps.n.cb = { ":AvanteConflictChooseBoth", desc = "Choose both" } - maps.v.cb = { ":AvanteConflictChooseBoth", desc = "Choose both" } + maps.n.cc = { "(AvanteConflictCursor)", desc = "Choose cursor", expr = true } + maps.v.cc = { "(AvanteConflictCursor)", desc = "Choose cursor", expr = true } - maps.n.cc = { ":AvanteConflictChooseCursor", desc = "Choose cursor" } - maps.v.cc = { ":AvanteConflictChooseCursor", desc = "Choose cursor" } + maps.n["]x"] = { "(AvanteConflictPrevConflict)", desc = "Move to previous conflict", expr = true } - maps.n["]x"] = { ":AvanteConflictPrevConflict", desc = "Move to previous conflict" } - maps.v["]x"] = { ":AvanteConflictPrevConflict", desc = "Move to previous conflict" } - - maps.n["[x"] = { ":AvanteConflictNextConflict", desc = "Move to next conflict" } - maps.x["[x"] = { ":AvanteConflictNextConflict", desc = "Move to next conflict" } + maps.n["[x"] = { "(AvanteConflictNextConflict)", desc = "Move to next conflict", expr = true } end, }, },