Added avante

This commit is contained in:
2025-09-05 16:28:19 -04:00
parent f435b2321a
commit 4ae2d233c2
2 changed files with 112 additions and 2 deletions

79
CLAUDE.md Normal file
View File

@@ -0,0 +1,79 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Architecture Overview
This is a Neovim configuration written in Lua using Neovim's native package manager (`vim.pack.add`). The configuration is modular, with each feature organized into separate Lua files.
### Core Structure
- `init.lua` - Main entry point, loads all modules and handles host-specific theming
- `lua/` - All Lua modules
- `options.lua` - Vim options, settings, and autocommands
- `plugins.lua` - Plugin definitions and basic setup using `vim.pack.add()`
- `keymaps.lua` - All key mappings including leader, Meta-X, Ctrl-X, and function key bindings
- `lsp.lua` - LSP configuration (lua_ls, gopls) with lsp_signature
- `completion.lua` - nvim-cmp completion setup
- `treesitter.lua` - Treesitter configuration
- `utils/` - Utility functions and overrides
- `t3_functions.lua` - Custom functions for file finding, note capture, and navigation
- `t3_overrides.lua` - Custom overrides
- `reload.lua` - Configuration reloading utilities
### Key Features
- **Multi-host theming**: Different TokyoNight themes based on hostname (xps13 uses "moon", Titan uses "storm")
- **TTY compatibility**: Automatic fallback to console-friendly themes and no icons when running in Linux console
- **Dual picker system**: Uses both FzfLua and Mini.pick for different workflows
- **Comprehensive key bindings**: Leader-based, Meta-X (Emacs-style), Ctrl-X, and function keys
- **Claude Code integration**: Built-in support with dedicated keymaps under `<leader>a`
- **Note-taking workflow**: Custom functions for capturing notes and snippets
### Plugin Management
Uses Neovim's native package manager (`vim.pack.add`). No external package manager like lazy.nvim or packer.nvim is used.
### Key Bindings Architecture
- **Leader key**: Space (`<leader>` = `" "`)
- **Leader mappings**: Organized by category (files, buffers, grep, git, tabs, AI)
- **Meta-X mappings**: Emacs-style command palette using Telescope
- **Ctrl-X mappings**: Additional workflows using Mini.pick
- **Function keys**: Quick access to common operations
### LSP Configuration
- Enabled for Lua (`lua_ls`) and Go (`gopls`) with comprehensive settings
- Uses lsp_signature for parameter hints
- Glance plugin for references/definitions with custom keymaps (`gR`, `gD`, `gY`, `gM`)
## Development Commands
This configuration doesn't have traditional build/test commands as it's a Neovim config. Key operations:
### Configuration Management
- Reload config: Use the reload utilities in `lua/utils/reload.lua`
- Test changes: Restart Neovim or use `:luafile %` for individual files
### Plugin Management
- Add plugins: Edit `lua/plugins.lua` and add to the `vim.pack.add()` table
- Plugin updates: Restart Neovim (native package manager handles updates)
### Custom Functions
- `:NeorgCapture` - Capture notes using the custom note-taking workflow
- `:CaptureSnip` - Capture code snippets for LuaSnip
- Various `t3_*` functions for file navigation and workflows
## Important Conventions
### File Organization
- All Lua code goes in `lua/` directory
- Utilities and custom functions in `lua/utils/`
- Each major feature gets its own file (lsp.lua, completion.lua, etc.)
### Keymaps
- Use descriptive `desc` fields for all keymaps (for which-key integration)
- Organize leader keymaps by category with sub-prefixes
- Function keys for frequently used operations
### Host-Specific Behavior
The config detects hostname and adjusts theming accordingly. When adding host-specific features, follow the pattern in `init.lua` lines 17-45.
### TTY Compatibility
The configuration automatically detects TTY environments and disables icons/complex UI elements. When adding new UI features, consider TTY fallbacks.

View File

@@ -25,7 +25,7 @@ vim.pack.add({
{ src = "https://github.com/hrsh7th/cmp-cmdline" },
{ src = "https://github.com/hrsh7th/cmp-nvim-lua" },
{ src = "https://github.com/saadparwaiz1/cmp_luasnip" },
-- { src = "https://github.com/github/copilot.vim" },
{ src = "https://github.com/github/copilot.vim" },
{ src = "https://github.com/pysan3/pathlib.nvim" },
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
{ src = "https://github.com/lukas-reineke/headlines.nvim" },
@@ -58,6 +58,8 @@ vim.pack.add({
{ src = "https://github.com/francoiscabrol/ranger.vim" },
{ src = "https://github.com/folke/snacks.nvim" },
{ src = "https://github.com/coder/claudecode.nvim" },
{ src = "https://github.com/yetone/avante.nvim" },
})
if host == "xps13" then
@@ -138,4 +140,33 @@ require('nvim-devdocs').setup({})
-- lsp_doc_border = false, -- add a border to hover docs and signature help
-- },
-- })
require("claudecode").setup({})
-- require("claudecode").setup({})
require('avante').setup({
opts = {
-- add any opts here
-- this file can contain specific instructions for your project
instructions_file = "avante.md",
-- for example
provider = "copilot",
providers = {
-- claude = {
-- endpoint = "https://api.anthropic.com",
-- model = "claude-sonnet-4-20250514",
-- timeout = 30000, -- Timeout in milliseconds
-- extra_request_body = {
-- temperature = 0.75,
-- max_tokens = 20480,
-- },
-- },
-- moonshot = {
-- endpoint = "https://api.moonshot.ai/v1",
-- model = "kimi-k2-0711-preview",
-- timeout = 30000, -- Timeout in milliseconds
-- extra_request_body = {
-- temperature = 0.75,
-- max_tokens = 32768,
-- },
-- },
}
}
})