73 lines
2.1 KiB
Lua
73 lines
2.1 KiB
Lua
require("lz.n").load({
|
|
{
|
|
"copilot.lua",
|
|
cmd = "Copilot",
|
|
event = "InsertEnter",
|
|
after = function()
|
|
require("copilot").setup({
|
|
-- Disable inline suggestions, let CodeCompanion (or blink) handle interactions
|
|
suggestion = { enabled = false },
|
|
panel = { enabled = false },
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"codecompanion.nvim",
|
|
cmd = { "CodeCompanion", "CodeCompanionChat", "CodeCompanionActions" },
|
|
keys = {
|
|
{ "<leader>aa", "<cmd>CodeCompanionChat Toggle<cr>", mode = { "n", "v" }, desc = "[A]I [A]ssistant" },
|
|
{ "<leader>ac", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "[A]I [C]ode Actions" },
|
|
},
|
|
after = function()
|
|
require("codecompanion").setup({
|
|
-- Set Gemini as the default strategy
|
|
strategies = {
|
|
chat = {
|
|
adapter = "gemini",
|
|
},
|
|
inline = {
|
|
adapter = "gemini",
|
|
},
|
|
},
|
|
-- Configure all available adapters
|
|
adapters = {
|
|
copilot = function()
|
|
return require("codecompanion.adapters").extend("copilot", {
|
|
schema = {
|
|
model = {
|
|
default = "claude-3.5-sonnet", -- Good default for Copilot chat
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
gemini = function()
|
|
return require("codecompanion.adapters").extend("gemini", {
|
|
env = {
|
|
api_key = "GEMINI_API_KEY",
|
|
},
|
|
schema = {
|
|
model = {
|
|
default = "gemini-3.1-pro-preview",
|
|
},
|
|
},
|
|
})
|
|
end,
|
|
gemini_cli = function()
|
|
return require("codecompanion.adapters").extend("gemini_cli", {
|
|
-- Pass the model as a CLI argument
|
|
args = {
|
|
"--model",
|
|
"gemini-3.1-pro-preview",
|
|
},
|
|
-- Set authentication to use standard Google Login
|
|
env = {
|
|
auth_method = "oauth-personal",
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
})
|
|
end,
|
|
},
|
|
})
|