vim.pack.add({ { src = 'https://github.com/carlos-algms/agentic.nvim' }, }) require('agentic').setup({ -- Available by default: "claude-agent-acp" | "gemini-acp" | "codex-acp" | "opencode-acp" | "cursor-acp" | "auggie-acp" | "mistral-vibe-acp" provider = "opencode-acp", -- setting the name here is all you need to get started keymaps = { -- Keybindings for ALL buffers in the widget (chat, prompt, code, files) widget = { close = "q", -- String for a single keybinding change_mode = { { "", mode = { "i", "n", "v" }, -- Specify modes for this keybinding }, }, switch_provider = "ga", -- Switch ACP provider switch_model = "gm", -- Switch model }, -- Keybindings for the prompt buffer only prompt = { submit = { "", -- Normal mode, just Enter { "", mode = { "n", "v", "i" }, }, }, paste_image = { { "p", mode = { "n" }, }, { "", -- Same as Claude-code in insert mode mode = { "i" }, } }, }, -- Keybindings for diff preview navigation diff_preview = { next_hunk = "]c", prev_hunk = "[c", }, }, }) vim.keymap.set({ "n", "v" }, 'mat', function() require("agentic").toggle() end, { desc = "Toggle Agentic Chat" }) vim.keymap.set({ "n", "v" }, '', function() require("agentic").add_selection_or_file_to_context() end, { desc = "Add file or selection to Agentic to Context" }) vim.keymap.set({ "n", "v" }, 'man', function() require("agentic").new_session() end, { desc = "New Agentic Session" }) vim.keymap.set({ "n", "v" }, 'r', function() require("agentic").restore_session() end, { desc = "Agentic Restore session" }) vim.keymap.set({ "n" }, 'mad', function() require("agentic").add_current_line_diagnostics() end, { desc = "Add current line diagnostic to Agentic" }) vim.keymap.set({ "n" }, 'maD', function() require("agentic").add_buffer_diagnostics() end, { desc = "Add all buffer diagnostics to Agentic" })