75 lines
1.8 KiB
Lua
75 lines
1.8 KiB
Lua
return {
|
|
"olimorris/codecompanion.nvim",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
},
|
|
opts = {
|
|
display = {
|
|
chat = {
|
|
window = {
|
|
layout = "vertical",
|
|
width = 0.35,
|
|
height = 0.35,
|
|
},
|
|
keymaps = {
|
|
close = {
|
|
modes = {
|
|
n = "q", -- Bind "q" in normal mode to close the chat
|
|
},
|
|
index = 1,
|
|
callback = "keymaps.close",
|
|
description = "Close Chat",
|
|
},
|
|
}
|
|
},
|
|
},
|
|
interactions = {
|
|
chat = {
|
|
adapter = "gemini_pro", -- Removed the curly braces
|
|
},
|
|
inline = {
|
|
adapter = "gemini_flash", -- Removed the curly braces
|
|
},
|
|
},
|
|
background = {
|
|
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
|
|
},
|
|
adapters = {
|
|
http = {
|
|
gemini_pro = function()
|
|
return require("codecompanion.adapters").extend("gemini", {
|
|
name = "gemini_pro",
|
|
schema = {
|
|
model = {
|
|
default = "gemini-3.5-flash",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
gemini_flash = function()
|
|
return require("codecompanion.adapters").extend("gemini", {
|
|
name = "gemini_flash",
|
|
schema = {
|
|
model = {
|
|
default = "gemini-2.0-flash",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
-- Added an extended Ollama adapter to fix your background task
|
|
ollama_bg = function()
|
|
return require("codecompanion.adapters").extend("ollama", {
|
|
name = "ollama_bg",
|
|
schema = {
|
|
model = {
|
|
default = "qwen-7b-instruct",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
},
|
|
}
|
|
}
|