diff --git a/config/bash/aliases b/config/bash/aliases index 2d24e17..096e8ff 100644 --- a/config/bash/aliases +++ b/config/bash/aliases @@ -10,6 +10,7 @@ alias shutdown="systemctl poweroff" alias update-grub="sudo grub-mkconfig -o /etc/grub2-efi.cfg" alias nvidia-smi-docker='sudo docker run --rm --gpus all --privileged nvidia/cuda:12.8.1-base-ubuntu24.04 nvidia-smi' alias ncconnect='sudo docker exec -u www-data -it nextcloud-aio-nextcloud bash' +alias avante='nvim -c "lua vim.defer_fn(function()require(\"avante.api\").zen_mode()end, 100)"' # Docker Shortcuts alias docker-up='sudo docker compose up -d' diff --git a/config/dot/nvim/lua/plugins/avante.lua b/config/dot/nvim/lua/plugins/avante.lua index 6258585..669f38c 100644 --- a/config/dot/nvim/lua/plugins/avante.lua +++ b/config/dot/nvim/lua/plugins/avante.lua @@ -11,36 +11,46 @@ return { ---@type avante.Config opts = { instructions_file = 'avante.md', - provider = 'openai', - auto_suggestions_provider = 'openai', + provider = 'claude', + auto_suggestions_provider = 'claude', providers = { claude = { endpoint = 'https://api.anthropic.com', - model = 'claude-sonnet-4-20250514', + model = 'claude-sonnet-4-5-20250929', timeout = 30000, extra_request_body = { temperature = 0.75, - max_tokens = 4096, + max_tokens = 20480, }, }, openai = { endpoint = 'https://api.openai.com/v1', - model = 'gpt-5', + model = 'gpt-5.2', extra_request_body = { temperature = 1, max_completion_tokens = 8192, }, }, }, + acp_providers = { + ["claude-code"] = { + command = "npx", + args = { "@zed-industries/claude-code-acp" }, + env = { + NODE_NO_WARNINGS = "1", + ANTHROPIC_API_KEY = os.getenv("ANTHROPIC_API_KEY"), + }, + }, + }, rag_service = { - enabled = false, + enabled = true, host_path = '/home/gib/Documents/Code', runner = 'docker', llm = { provider = 'openai', endpoint = 'https://api.openai.com/v1', api_key = 'OPENAI_API_KEY', - model = 'gpt-5', + model = 'gpt-5-mini', extra = { temperature = 1, max_tokens = 512, @@ -73,11 +83,24 @@ return { auto_set_highlight_group = true, auto_set_keymaps = true, auto_apply_diff_after_generation = false, - support_paste_from_clipboard = false, + support_paste_from_clipboard = true, minimize_diff = true, enable_token_counting = true, auto_approve_tool_permissions = true, }, + prompt_logger = { + enabled = true, + log_dir = vim.fn.stdpath("cache") .. "/avante_prompts", -- directory where logs are saved + fortune_cookie_on_success = false, -- shows a random fortune after each logged prompt (requires `fortune` installed) + next_prompt = { + normal = "", -- load the next (newer) prompt log in normal mode + insert = "", + }, + prev_prompt = { + normal = "", -- load the previous (older) prompt log in normal mode + insert = "", + }, + }, mappings = { --- @class AvanteConflictMappings diff = { @@ -120,31 +143,41 @@ return { close_from_input = nil, }, }, + selection = { + enabled = true, + hint_display = 'delayed', + }, hints = { enabled = true }, + windows = { - ---@type 'right' | 'left' | 'top' | 'bottom' - position = 'right', - wrap = true, - width = 35, + ---@type "right" | "left" | "top" | "bottom" + position = "right", -- the position of the sidebar + wrap = true, -- similar to vim.o.wrap + width = 30, -- default % based on available width sidebar_header = { - enabled = true, - align = 'center', + enabled = true, -- true, false to enable/disable the header + align = "center", -- left, center, right for title rounded = true, }, + spinner = { + editing = { "⡀", "⠄", "⠂", "⠁", "⠈", "⠐", "⠠", "⢀", "⣀", "⢄", "⢂", "⢁", "⢈", "⢐", "⢠", "⣠", "⢤", "⢢", "⢡", "⢨", "⢰", "⣰", "⢴", "⢲", "⢱", "⢸", "⣸", "⢼", "⢺", "⢹", "⣹", "⢽", "⢻", "⣻", "⢿", "⣿" }, + generating = { "·", "✢", "✳", "∗", "✻", "✽" }, -- Spinner characters for the 'generating' state + thinking = { "🤯", "🙄" }, -- Spinner characters for the 'thinking' state + }, input = { - prefix = '> ', - height = 8, + prefix = "> ", + height = 8, -- Height of the input window in vertical layout }, edit = { - border = 'rounded', - start_insert = true, + border = "rounded", + start_insert = true, -- Start insert mode when opening the edit window }, ask = { - floating = false, - start_insert = true, - border = 'rounded', - ---@type 'ours' | 'theirs' - focus_on_apply = 'ours', + floating = false, -- Open the 'AvanteAsk' prompt in a floating window + start_insert = true, -- Start insert mode when opening the ask window + border = "rounded", + ---@type "ours" | "theirs" + focus_on_apply = "ours", -- which diff to focus after applying }, }, highlights = { @@ -161,8 +194,8 @@ return { override_timeoutlen = 500, }, suggestion = { - debounce = 1000, - throttle = 1000, + debounce = 600, + throttle = 600, }, }, dependencies = {