-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: visual mode selection + pressing key 'c' is slow, if pressed twice error shows up #580
Comments
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 |
I have this too. |
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? |
Screen.Recording.2024-09-15.at.3.28.50.PM.mov
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 |
Ok the astronvim config aside, AstroNvim/astrocommunity#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
The text was updated successfully, but these errors were encountered: