aider.nvim
aider.nvim copied to clipboard
LazyVim
Hi,
Is it possible to use this plugin with LazyVim? I see you have 3 methods listed in the readme but noticed it's lacking LazyVim which is what I and many others use for plugin management. I had a quick try at getting it to work with no luck.
try this with the default LazyVim plugin setup style e.g. in lua/plugins/aider.lua
return {
"joshuavial/aider.nvim",
opts = {
-- auto_manage_context = false,
default_bindings = false,
},
keys = function()
return {
{
"<leader>ao",
"<cmd>lua AiderOpen()<cr>i",
desc = "Aider Open",
},
{
"<leader>ab",
"<cmd>lua AiderBackground()<cr>",
desc = "Aider Background",
-- defaults to message "Complete as many todo items as you can and remove the comment for any item you complete."
},
}
end,
}
Great thank you, that works. However when I run <leader>ao and Aider opens up, it weirdly creates 3 empty files: [1000], neo-tree and filesystem. Is that normal?
no, I don't get those other files.
It appears that this no longer works as intended. I've manged to put together:
return {
"joshuavial/aider.nvim",
config = function()
require("aider").setup({
auto_manage_context = true,
default_bindings = true,
})
end,
keys = {
{
"<leader>oa",
function()
require("aider").AiderOpen()
end,
desc = "Aider Open",
},
{
"<leader>ob",
function()
require("aider").AiderBackground()
end,
desc = "Aider Background",
},
},
}
after some troubleshooting under aider.lua in the plugins folder (Lazyvim the distro, mind you, not lazy.nvim.) The behavior I get from this (after adding the auto_manage_context and default_bindings fields to the .setup block, originally i didn't error out but i didn't get any behavior) is that the window flashes open in a split to the right for just a moment, the gitignore and neoconf get created, but immediately closes with error code 127 when i run in the background. Any ideas about what's going on? I'm relatively new to vim/Lazyvim/lua but pretty familiar with aider otherwise.
no idea, sry, currently running the same config as I posted above with latest LazyVim distro without problems.
return { "joshuavial/aider.nvim", config = function() require("aider").setup({ auto_manage_context = true, default_bindings = true, }) end, keys = { { "
oa", function() require("aider").AiderOpen() end, desc = "Aider Open", }, { " ob", function() require("aider").AiderBackground() end, desc = "Aider Background", }, }, }
I confirm this is working fine for me to install on lazy vim
Great thank you, that works. However when I run
<leader>aoand Aider opens up, it weirdly creates 3 empty files:[1000],neo-treeandfilesystem. Is that normal?
Did you manage to fix this issue?
the window flashes open in a split to the right for just a moment, the gitignore and neoconf get created, but immediately closes with error code 127 when i run in the background
I have the same issue. Did you ever get it solved @twilwa?
Lazy is using "old" which-key mappings, I've ended splitting the keys = into:
config = function()
requiere("which-key").add({.....}) -- instead of .register which is lazy defaults
end
the window flashes open in a split to the right for just a moment, the gitignore and neoconf get created, but immediately closes with error code 127 when i run in the background
I have the same issue. Did you ever get it solved @twilwa?
It's been a while, but I beleive the issue was something to do with my API key not being set as an env var, so verify that (as well as making sure that the venv your aider is starting from has the same env var) first.
I've pushed up a new version which should work fine with lazy now