Closed av1155 closed 1 month ago
Hi there, I can't reproduce this. Can you please share your config?
Also, can you test to see if a similar error appears when you quickly hit ct
or co
?
I have this too. cc
is very slow.
Are you using which-key by any chance? I can't reproduce this?
would be best if you can also provide a screen recording. Thanks
I am
can you provide a repro?
https://github.com/user-attachments/assets/c9161e56-b868-4dbf-92b7-34abb25da401
cw
is instant, vwc
is slow, vwcc
produces error (pressing c
more than once on a highlighted string).
Visual string highlight can be either with key stroke or mouse double click.
Obviously pressing c more than once on a highlighted string has no use, but sometimes we like to press keys many times, idk y.
I am using AstroNvim but I have had this config for around 1 year and a half now, I moved away from all IDE's. So I can safely say I understand how Neovim configuration works.
My avante config is the one provided by astrocommunity (https://github.com/AstroNvim/astrocommunity/tree/main/lua/astrocommunity/completion/avante-nvim), the only reason for me to have that lazy config is in case i want to modify any defaults, which I only modified it so that the side panel uses 40% of screen instead of 30%.
I am using which-key.
init.lua provided by astrocommunity:
return {
"yetone/avante.nvim",
build = ":AvanteBuild",
cmd = {
"AvanteAsk",
"AvanteBuild",
"AvanteConflictChooseAllTheirs",
"AvanteConflictChooseBase",
"AvanteConflictChooseBoth",
"AvanteConflictChooseCursor",
"AvanteConflictChooseNone",
"AvanteConflictChooseOurs",
"AvanteConflictChooseTheirs",
"AvanteConflictListQf",
"AvanteConflictNextConflict",
"AvanteConflictPrevConflict",
"AvanteEdit",
"AvanteRefresh",
"AvanteSwitchProvider",
},
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
{
"AstroNvim/astrocore",
opts = function(_, opts)
local maps = assert(opts.mappings)
local prefix = "<Leader>a"
maps.n[prefix] = { desc = "Avante functionalities" }
maps.n[prefix .. "a"] = { function() require("avante.api").ask() end, desc = "Avante ask" }
maps.v[prefix .. "a"] = { function() require("avante.api").ask() end, desc = "Avante ask" }
maps.v[prefix .. "r"] = { function() require("avante.api").refresh() end, desc = "Avante refresh" }
maps.n[prefix .. "e"] = { function() require("avante.api").edit() end, desc = "Avante edit" }
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<CR>", desc = "Choose ours" }
maps.v.co = { ":AvanteConflictChooseOurs<CR>", desc = "Choose ours" }
maps.n.ct = { ":AvanteConflictChooseTheirs<CR>", desc = "Choose theirs" }
maps.v.ct = { ":AvanteConflictChooseTheirs<CR>", desc = "Choose theirs" }
maps.n.ca = { ":AvanteConflictChooseAllTheirs<CR>", desc = "Choose all theirs" }
maps.v.ca = { ":AvanteConflictChooseAllTheirs<CR>", desc = "Choose all theirs" }
maps.n.c0 = { ":AvanteConflictChooseNone<CR>", desc = "Choose none" }
maps.v.c0 = { ":AvanteConflictChooseNone<CR>", desc = "Choose none" }
maps.n.cb = { ":AvanteConflictChooseBoth<CR>", desc = "Choose both" }
maps.v.cb = { ":AvanteConflictChooseBoth<CR>", desc = "Choose both" }
maps.n.cc = { ":AvanteConflictChooseCursor<CR>", desc = "Choose cursor" }
maps.v.cc = { ":AvanteConflictChooseCursor<CR>", desc = "Choose cursor" }
maps.n["]x"] = { ":AvanteConflictPrevConflict<CR>", desc = "Move to previous conflict" }
maps.v["]x"] = { ":AvanteConflictPrevConflict<CR>", desc = "Move to previous conflict" }
maps.n["[x"] = { ":AvanteConflictNextConflict<CR>", desc = "Move to next conflict" }
maps.x["[x"] = { ":AvanteConflictNextConflict<CR>", desc = "Move to next conflict" }
end,
},
},
opts = {},
specs = { -- configure optional plugins
{ -- if copilot.lua is available, default to copilot provider
"zbirenbaum/copilot.lua",
optional = true,
specs = {
{
"yetone/avante.nvim",
opts = {
provider = "copilot",
},
},
},
},
{
-- make sure `Avante` is added as a filetype
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
opts = function(_, opts)
if not opts.file_types then opts.filetypes = { "markdown" } end
opts.file_types = require("astrocore").list_insert_unique(opts.file_types, { "Avante" })
end,
},
{
-- make sure `Avante` is added as a filetype
"OXY2DEV/markview.nvim",
optional = true,
opts = function(_, opts)
if not opts.filetypes then opts.filetypes = { "markdown", "quarto", "rmd" } end
opts.filetypes = require("astrocore").list_insert_unique(opts.filetypes, { "Avante" })
end,
},
},
}
Oh ok these commands don't exist anymore
AvanteConflictChooseAllTheirs",
"AvanteConflictChooseBase",
"AvanteConflictChooseBoth",
"AvanteConflictChooseCursor",
"AvanteConflictChooseNone",
"AvanteConflictChooseOurs",
"AvanteConflictChooseTheirs",
"AvanteConflictListQf",
"AvanteConflictNextConflict",
"AvanteConflictPrevConflict",
We now replaced all of those with <Plug>(Command)
instead. Probably should update upstream with astronvim
Ok the astronvim config aside, https://github.com/AstroNvim/astrocommunity/pull/1210
Thank you!
Describe the bug
**E492: Not an editor command: '<,'>AvanteConflictChooseCursor**
Slow behavior:
Error shows up if:
E492: Not an editor command: '<,'>AvanteConflictChooseCursor
To reproduce
E492: Not an editor command: '<,'>AvanteConflictChooseCursor
Slow behavior:
Error shows up if:
Expected behavior
No error when pressing 'c' key fast, and fast use of 'c' key in visual mode when Avante is installed.
Environment
NVIM v0.10.1 Build type: Release LuaJIT 2.1.1725453128 Run "nvim -V1 -v" for more info
Repro
No response