From cd2e68485bee39e682f4ddd02d0e8da448dd01ef Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Sun, 15 Sep 2024 16:29:35 -0400 Subject: [PATCH 1/2] chore(avante): update correct plug mappings Avante will now provide Plug mapping instead of commands for some functionalities to avoid poluting namespace from users. --- .../completion/avante-nvim/init.lua | 39 ++++++------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/lua/astrocommunity/completion/avante-nvim/init.lua b/lua/astrocommunity/completion/avante-nvim/init.lua index 10d316614..5b11c0621 100644 --- a/lua/astrocommunity/completion/avante-nvim/init.lua +++ b/lua/astrocommunity/completion/avante-nvim/init.lua @@ -4,16 +4,6 @@ return { cmd = { "AvanteAsk", "AvanteBuild", - "AvanteConflictChooseAllTheirs", - "AvanteConflictChooseBase", - "AvanteConflictChooseBoth", - "AvanteConflictChooseCursor", - "AvanteConflictChooseNone", - "AvanteConflictChooseOurs", - "AvanteConflictChooseTheirs", - "AvanteConflictListQf", - "AvanteConflictNextConflict", - "AvanteConflictPrevConflict", "AvanteEdit", "AvanteRefresh", "AvanteSwitchProvider", @@ -39,29 +29,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, }, }, From dde2e114cefb93fa004467fb43b56454e0d09eae Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Sun, 15 Sep 2024 20:16:23 -0400 Subject: [PATCH 2/2] Update lua/astrocommunity/completion/avante-nvim/init.lua Co-authored-by: Micah Halter --- lua/astrocommunity/completion/avante-nvim/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/astrocommunity/completion/avante-nvim/init.lua b/lua/astrocommunity/completion/avante-nvim/init.lua index 5b11c0621..e8e0cfa97 100644 --- a/lua/astrocommunity/completion/avante-nvim/init.lua +++ b/lua/astrocommunity/completion/avante-nvim/init.lua @@ -7,6 +7,9 @@ return { "AvanteEdit", "AvanteRefresh", "AvanteSwitchProvider", + "AvanteChat", + "AvanteToggle", + "AvanteClear", }, dependencies = { "stevearc/dressing.nvim",