A Neovim plugin for seamless integration with aider, an AI pair programming tool.
- Floating terminal integration for aider CLI
- Easy file management with add/drop commands
- Support for both buffer and nvim-tree operations
- Customizable keymaps
- Neovim >= 0.7.0
- toggleterm.nvim
- nvim-tree.lua (optional, for tree integration)
- aider CLI tool
Using lazy.nvim:
{
'psm14/toggleterm-aider',
dependencies = {
'akinsho/toggleterm.nvim',
'nvim-tree/nvim-tree.lua', -- optional
},
config = function()
require('toggleterm-aider').setup()
end
}
The plugin works out of the box with sensible defaults, but can be customized with optional settings:
require('toggleterm-aider').setup({
-- Custom aider CLI arguments
args = "--no-pretty --no-auto-commit --no-gitignore --watch-files",
-- Custom keymaps (defaults shown below)
toggle_key = '<leader>as', -- Toggle aider terminal
add_key = '<leader>aa', -- Add file to aider
drop_key = '<leader>ad' -- Drop file from aider
})
<leader>as
: Toggle aider terminal<leader>aa
: Add current file to aider session<leader>ad
: Drop current file from aider session
These keymaps work in both normal buffers and nvim-tree.
- Open Neovim and press
<leader>as
to start an aider session - Navigate to a file you want to edit with aider
- Press
<leader>aa
to add the file to the session - Start chatting with aider in the floating terminal
- Use
<leader>ad
to drop files from the session when needed
MIT