Configure CodeCompanion plugin
This commit is contained in:
parent
3ac084f28e
commit
84e15f0e20
1 changed files with 84 additions and 41 deletions
|
|
@ -21,8 +21,8 @@ return {
|
|||
},
|
||||
build = "make tiktoken",
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>cc", ":CopilotChatToggle<CR>", { desc = "Toggle Copilot Chat" })
|
||||
vim.keymap.set("n", "<leader>cx", ":CopilotChatReset<CR>", { desc = "Reset Copilot Chat" })
|
||||
-- vim.keymap.set("n", "<leader>cc", ":CopilotChatToggle<CR>", { desc = "Toggle Copilot Chat" })
|
||||
-- vim.keymap.set("n", "<leader>cx", ":CopilotChatReset<CR>", { desc = "Reset Copilot Chat" })
|
||||
require("CopilotChat").setup({
|
||||
question_header = "",
|
||||
answer_header = "",
|
||||
|
|
@ -40,4 +40,47 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"franco-ruggeri/codecompanion-spinner.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>cc", ":CodeCompanionChat Toggle<CR>", { desc = "Toggle CodeCompanion Chat" })
|
||||
vim.keymap.set("v", "<leader>cc", ":CodeCompanionChat Add<CR>", { desc = "Add Context to CodeCompanion Chat" })
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cx",
|
||||
":CodeCompanion chat clear<CR>",
|
||||
{ desc = "Clear CodeCompanion Chat History" }
|
||||
)
|
||||
|
||||
require("codecompanion").setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
model = "claude-3.5-sonnet",
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
spinner = {},
|
||||
},
|
||||
display = {
|
||||
action_palette = {
|
||||
width = 95,
|
||||
height = 10,
|
||||
prompt = "Prompt ", -- Prompt used for interactive LLM calls
|
||||
provider = "default",
|
||||
opts = {
|
||||
show_default_actions = true, -- Show the default actions in the action palette?
|
||||
show_default_prompt_library = true, -- Show the default prompt library in the action palette?
|
||||
title = "CodeCompanion actions", -- The title of the action palette
|
||||
},
|
||||
},
|
||||
},
|
||||
log_level = "DEBUG",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue