return { { "olimorris/codecompanion.nvim", enabled = vim.loop.os_uname().sysname == "Darwin", opts = {}, dependencies = { "nvim-lua/plenary.nvim", }, }, { "zbirenbaum/copilot.lua", enabled = vim.loop.os_uname().sysname == "Darwin", optional = false, opts = function() require("copilot.api").status = require("copilot.status") return { suggestion = { auto_trigger = true, debounce = 100, keymap = { accept = "", next = "", prev = "", dismiss = "", }, }, -- panel = { -- enabled = false, -- auto_refresh = true, -- keymap = { -- jump_next = "", -- jump_prev = "", -- accept = "", -- refresh = "r", -- open = "", -- }, -- }, } end, }, { "coder/claudecode.nvim", dependencies = { "folke/snacks.nvim" }, config = true, keys = { { "a", nil, desc = "AI/Claude Code" }, { "ac", "ClaudeCode", desc = "Toggle Claude" }, { "af", "ClaudeCodeFocus", desc = "Focus Claude" }, { "ar", "ClaudeCode --resume", desc = "Resume Claude" }, { "aC", "ClaudeCode --continue", desc = "Continue Claude" }, { "am", "ClaudeCodeSelectModel", desc = "Select Claude model" }, { "ab", "ClaudeCodeAdd %", desc = "Add current buffer" }, { "as", "ClaudeCodeSend", mode = "v", desc = "Send to Claude" }, { "as", "ClaudeCodeTreeAdd", desc = "Add file", ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw" }, }, -- Diff management { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, }, }, { "ThePrimeagen/99", config = function() local _99 = require("99") -- For logging that is to a file if you wish to trace through requests -- for reporting bugs, i would not rely on this, but instead the provided -- logging mechanisms within 99. This is for more debugging purposes local cwd = vim.uv.cwd() local basename = vim.fs.basename(cwd) _99.setup({ provider = _99.Providers.ClaudeCodeProvider, -- default: OpenCodeProvider logger = { level = _99.DEBUG, path = "/tmp/" .. basename .. ".99.debug", print_on_error = true, }, -- When setting this to something that is not inside the CWD tools -- such as claude code or opencode will have permission issues -- and generation will fail refer to tool documentation to resolve -- https://opencode.ai/docs/permissions/#external-directories -- https://code.claude.com/docs/en/permissions#read-and-edit tmp_dir = "./tmp", --- Completions: #rules and @files in the prompt buffer completion = { -- I am going to disable these until i understand the -- problem better. Inside of cursor rules there is also -- application rules, which means i need to apply these -- differently -- cursor_rules = "" --- A list of folders where you have your own SKILL.md --- Expected format: --- /path/to/dir//SKILL.md --- --- Example: --- Input Path: --- "scratch/custom_rules/" --- --- Output Rules: --- {path = "scratch/custom_rules/vim/SKILL.md", name = "vim"}, --- ... the other rules in that dir ... --- custom_rules = { -- "scratch/custom_rules/", }, --- Configure @file completion (all fields optional, sensible defaults) files = { -- enabled = true, -- max_file_size = 102400, -- bytes, skip files larger than this -- max_files = 5000, -- cap on total discovered files -- exclude = { ".env", ".env.*", "node_modules", ".git", ... }, }, --- File Discovery: --- - In git repos: Uses `git ls-files` which automatically respects .gitignore --- - Non-git repos: Falls back to filesystem scanning with manual excludes --- - Both methods apply the configured `exclude` list on top of gitignore --- What autocomplete engine to use. Defaults to native (built-in) if not specified. source = "native", -- "native" (default), "cmp", or "blink" }, --- WARNING: if you change cwd then this is likely broken --- ill likely fix this in a later change --- --- md_files is a list of files to look for and auto add based on the location --- of the originating request. That means if you are at /foo/bar/baz.lua --- the system will automagically look for: --- /foo/bar/AGENT.md --- /foo/AGENT.md --- assuming that /foo is project root (based on cwd) md_files = { "AGENT.md", }, }) -- take extra note that i have visual selection only in v mode -- technically whatever your last visual selection is, will be used -- so i have this set to visual mode so i dont screw up and use an -- old visual selection -- -- likely ill add a mode check and assert on required visual mode -- so just prepare for it now vim.keymap.set("v", "9v", function() _99.visual() end) --- if you have a request you dont want to make any changes, just cancel it vim.keymap.set("n", "9x", function() _99.stop_all_requests() end) vim.keymap.set("n", "9s", function() _99.search() end) end, }, { "nickjvandyke/opencode.nvim", version = "*", -- Latest stable release dependencies = { { -- `snacks.nvim` integration is recommended, but optional ---@module "snacks" <- Loads `snacks.nvim` types for configuration intellisense "folke/snacks.nvim", optional = true, opts = { input = {}, -- Enhances `ask()` picker = { -- Enhances `select()` actions = { opencode_send = function(...) return require("opencode").snacks_picker_send(...) end, }, win = { input = { keys = { [""] = { "opencode_send", mode = { "n", "i" } }, }, }, }, }, }, }, }, config = function() ---@type opencode.Opts vim.g.opencode_opts = { -- Your configuration, if any; goto definition on the type or field for details } vim.o.autoread = true -- Required for `opts.events.reload` -- Recommended/example keymaps vim.keymap.set({ "n", "x" }, "", function() require("opencode").ask("@this: ", { submit = true }) end, { desc = "Ask opencode…" }) vim.keymap.set({ "n", "x" }, "", function() require("opencode").select() end, { desc = "Execute opencode action…" }) vim.keymap.set({ "n", "t" }, "", function() require("opencode").toggle() end, { desc = "Toggle opencode" }) vim.keymap.set({ "n", "x" }, "go", function() return require("opencode").operator("@this ") end, { desc = "Add range to opencode", expr = true }) vim.keymap.set("n", "goo", function() return require("opencode").operator("@this ") .. "_" end, { desc = "Add line to opencode", expr = true }) vim.keymap.set("n", "", function() require("opencode").command("session.half.page.up") end, { desc = "Scroll opencode up" }) vim.keymap.set("n", "", function() require("opencode").command("session.half.page.down") end, { desc = "Scroll opencode down" }) -- You may want these if you use the opinionated `` and `` keymaps above — otherwise consider `o…` (and remove terminal mode from the `toggle` keymap) vim.keymap.set("n", "+", "", { desc = "Increment under cursor", noremap = true }) vim.keymap.set("n", "-", "", { desc = "Decrement under cursor", noremap = true }) end, }, }