Skip to content

psm14/toggleterm-aider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

toggleterm-aider

A Neovim plugin for seamless integration with aider, an AI pair programming tool.

Features

  • Floating terminal integration for aider CLI
  • Easy file management with add/drop commands
  • Support for both buffer and nvim-tree operations
  • Customizable keymaps

Prerequisites

Installation

Using lazy.nvim:

{
  'psm14/toggleterm-aider',
  dependencies = {
    'akinsho/toggleterm.nvim',
    'nvim-tree/nvim-tree.lua', -- optional
  },
  config = function()
    require('toggleterm-aider').setup()
  end
}

Configuration

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
})

Default Keymaps

  • <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.

Usage

  1. Open Neovim and press <leader>as to start an aider session
  2. Navigate to a file you want to edit with aider
  3. Press <leader>aa to add the file to the session
  4. Start chatting with aider in the floating terminal
  5. Use <leader>ad to drop files from the session when needed

License

MIT

About

Toggleterm-based aider integration for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages