#! /usr/bin/env lua -- -- ai.lua -- Copyright (C) 2025 veypi -- -- Distributed under terms of the MIT license. -- return { -- { "github/copilot.vim" }, { "kkrampis/codex.nvim", lazy = true, cmd = { "Codex", "CodexToggle" }, -- Optional: Load only on command execution keys = { { "xc", -- Change this to your preferred keybinding function() require("codex").toggle() end, desc = "Toggle Codex popup or side-panel", mode = { "n", "t" }, }, }, opts = { cmd = { "bash", "-c", "http_proxy=http://127.0.0.1:7897 https_proxy=http://127.0.0.1:7897 codex" }, keymaps = { toggle = nil, -- Keybind to toggle Codex window (Disabled by default, watch out for conflicts) quit = "", -- Keybind to close the Codex window (default: Ctrl + q) }, -- Disable internal default keymap (cc -> :CodexToggle) border = "rounded", -- Options: 'single', 'double', or 'rounded' width = 0.8, -- Width of the floating window (0.0 to 1.0) height = 0.8, -- Height of the floating window (0.0 to 1.0) model = nil, -- Optional: pass a string to use a specific model (e.g., 'o3-mini') panel = false, -- Open Codex in a side-panel (vertical split) instead of floating window use_buffer = false, -- Capture Codex stdout into a normal buffer instead of a terminal buffer }, }, { "coder/claudecode.nvim", opts = {}, keys = { { "a", "", desc = "+ai", mode = { "n", "v" } }, { "ac", "ClaudeCode", desc = "Toggle Claude" }, { "af", "ClaudeCodeFocus", desc = "Focus Claude" }, { "ar", "ClaudeCode --resume", desc = "Resume Claude" }, { "aC", "ClaudeCode --continue", desc = "Continue Claude" }, { "ab", "ClaudeCodeAdd %", desc = "Add current buffer" }, { "as", "ClaudeCodeSend", mode = "v", desc = "Send to Claude" }, { "as", "ClaudeCodeTreeAdd", desc = "Add file", ft = { "NvimTree", "neo-tree", "oil" }, }, -- Diff management { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, }, }