require("codecompanion").setup({ adapters = { llama3_2 = function() return require("codecompanion.adapters").extend("ollama", { name = "llama3_2", -- Give this adapter a different name to differentiate it from the default ollama adapter schema = { model = { default = "llama3.2:latest", }, }, }) end, phi4 = function() return require("codecompanion.adapters").extend("ollama", { name = "phi4", -- Give this adapter a different name to differentiate it from the default ollama adapter schema = { model = { default = "phi4:latest", }, }, }) end, }, strategies = { chat = { adapter= "phi4", }, inline = { adapter="phi4", } } }) vim.api.nvim_set_keymap("v", "ce", "", { callback = function() require("codecompanion").prompt("explain") end, noremap = true, silent = true, }) vim.api.nvim_set_keymap("n", "", "CodeCompanionActions", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "", "CodeCompanionActions", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "tc", "CodeCompanionChat Toggle", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "tc", "CodeCompanionChat Toggle", { noremap = true, silent = true }) vim.api.nvim_set_keymap("v", "ga", ":CodeCompanionChat Add", { noremap = true, silent = true })