Files
nvim/lua/custom/configs/codecompanion.lua
Adam Bellinson 01480f98b5
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
do/end block treesitter, avante
2025-06-18 19:18:11 -04:00

44 lines
888 B
Lua

local options = {
adapters = {
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
env = {
url = "http://axiom.bell:11434",
api_key = "ollama",
},
headers = {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer ${api_key}",
},
parameters = {
sync = true,
},
})
end,
},
strategies = {
chat = {
adapter = "ollama",
},
inline = {
adapter = "ollama",
keymaps = {
accept_change = {
modes = { n = "ga" },
description = "Accept the suggested change",
},
reject_change = {
modes = { n = "gr" },
description = "Reject the suggested change",
},
},
},
cmd = {
adapter = "ollama",
}
},
}
return options