replaced codecompanion with sidekick for better gemini support, added a
few keybinds, need to add more
This commit is contained in:
@@ -1,129 +0,0 @@
|
||||
return {
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
|
||||
--{{{ Options
|
||||
opts = {
|
||||
--- {{{ Display
|
||||
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
|
||||
interactions = {
|
||||
chat = {
|
||||
adapter = "ollama_coder", -- Removed the curly braces
|
||||
},
|
||||
inline = {
|
||||
adapter = "ollama_coder", -- Removed the curly braces
|
||||
},
|
||||
background = {
|
||||
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
|
||||
}
|
||||
},
|
||||
-- }}}
|
||||
--
|
||||
-- {{{ Adapters
|
||||
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,
|
||||
-- local ollama coding model
|
||||
ollama_coder = function()
|
||||
return require("codecompanion.adapters").extend("ollama", {
|
||||
name = "ollama_bg",
|
||||
schema = {
|
||||
model = {
|
||||
default = "qwen2.5-coder:7b",
|
||||
},
|
||||
},
|
||||
})
|
||||
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 = "qwen3.5:4b",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
--
|
||||
-- {{{ Library
|
||||
prompt_library = {
|
||||
["Local Executor"] = {
|
||||
strategy = "chat",
|
||||
description = "Executes implementation diffs locally and writes TDD test cases.",
|
||||
opts = {
|
||||
adapter = "ollama_coder", -- Force it to use your local hardware
|
||||
is_default = false,
|
||||
is_slash_cmd = false,
|
||||
},
|
||||
prompts = {
|
||||
{
|
||||
role = "system",
|
||||
content = [[You are the Last Mile Executor.
|
||||
You run in a stateless context. I will provide you with a unified diff and a testing plan.
|
||||
Your strict execution order is:
|
||||
1. Output the test case file modifications first (SDET-first).
|
||||
2. Output the production implementation code modifications.
|
||||
|
||||
Do not write markdown headers (H1/H2). Use code blocks with the language ID.
|
||||
Precede every code block with a line comment specifying the exact 'filepath:'.
|
||||
Do not use bash syntax; adhere strictly to POSIX sh if writing shell automation.
|
||||
Do not execute terminal commands directly. Output the code blocks for manual unstaged review.]],
|
||||
},
|
||||
{
|
||||
role = "user",
|
||||
content = "I am ready to provide the Planner's diff. Await my input.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
}
|
||||
--}}}
|
||||
}
|
||||
28
lua/plugins/sidekick.lua
Normal file
28
lua/plugins/sidekick.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
"folke/sidekick.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>as",
|
||||
function()
|
||||
require("sidekick.cli").select()
|
||||
end,
|
||||
desc = "Sidekick (Select AI CLI)",
|
||||
},
|
||||
{
|
||||
"<leader>ak",
|
||||
function()
|
||||
require("sidekick.cli").toggle({ name = "antigravity", focus = true })
|
||||
end,
|
||||
desc = "Sidekick Toggle Antigravity",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
cli = {
|
||||
tools = {
|
||||
antigravity = {
|
||||
cmd = { "agy" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user