avante keybindings are missing or confusing
Checklist
- [x] I have searched through the AstroNvim documentation
- [x] I have searched through the existing issues of this project
- [x] I have searched the existing issues of plugins related to this issue
- [x] I can replicate the bug with the minimal
repro.luaprovided below
Neovim version (nvim -v)
0.11
Operating system/version
macOs 15.4
Terminal/GUI
kitty
Describe the bug
The avante plugin lists keybindings for accepting diffs and moving among diffs.
When using the avante community plugin, those keybindings do not seem available. The ones under <leader>A are there, but the other ones are not.
They look like they were removed in this commit.
https://github.com/AstroNvim/astrocommunity/commit/f401d9b0b5a4e019c5d32f3d4932136a4ca30505
Steps to Reproduce
- Load the avante community plugin and open a file that brings up Avante bindings
<leader>Abindings work, but the other ones seem absent.
Expected behavior
I expect the key bindings to work as described or similarly in the avante documentation.
Screenshots
No response
Additional Context
No response
Minimal configuration
-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
-- install plugins
local plugins = {
{ "AstroNvim/AstroNvim", import = "astronvim.plugins" },
{ "AstroNvim/astrocommunity" },
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.completion.copilot-lua" },
{import = "astrocommunity.completion.avante-nvim" },
-- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
-- add anything else here (autocommands, vim.filetype, etc.)
Avante sets up keybindings itself in its options. The plugin by default is loaded when a file is open. This could be changed to just load the plugin on start-up or something.
I observe that the plugin does get loaded upon file open, but the keybindings other than <leaderA> ones do not seem available.
The keybindings for accepting diffs arent underneath <Leader>A, they are co,ca, etc. And they appear when you cursor is inside a diff. Like this(I dont have the mappings defined in my config):
Ok. I am seeing this work as expected when I use claude but not when my model is copilot. I had not tried claude previously
In that case when I ask it to make a change and it shows me the suggested change. The bindings are not present.
If I select the copilot and restart nvim and ask avante for a change, i do not get the bindings that let me add the change.
If I select claude and restart nvim and ask avante for a change, the bindings work.
Did you setup the copilot provider correctly?
Yes, copilot works fine on its own and I was using it with chat and autocomplete before trying avante.
Can you provide me with your current avante.lua file?
I'm using the community pack with no edits. my community file is
-- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroCommunity: import any community modules here
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
-- This guarantees that the specs are processed before any user plugins.
---@type LazySpec
return {
"AstroNvim/astrocommunity",
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.rust" },
{ import = "astrocommunity.pack.python" },
{ import = "astrocommunity.pack.proto" },
{ import = "astrocommunity.pack.bash" },
{ import = "astrocommunity.pack.docker" },
{ import = "astrocommunity.pack.go" },
{ import = "astrocommunity.pack.json" },
--{ import = "astrocommunity.completion.copilot-vim-cmp" },
--{ import = "astrocommunity.completion.copilot-lua" },
{ import = "astrocommunity.completion.avante-nvim" },
{ import = "astrocommunity.markdown-and-latex.render-markdown-nvim" },
-- import/override with your plugins folder
}
You shouldnt comment the copilot.lua fron the community file
Oh sorry, when i have that uncommented, is what i mean. I had it commented out when i posted it to use claude, which works for me.
I am using { import = "astrocommunity.completion.copilot-lua" }
You can left it uncommented, to switch providers just use the "
Can this be closed now?