Move files out of their respective fs structure into program dirs in root and symlink dotfils using HM.
This commit is contained in:
parent
10bab010b7
commit
fb2adb4547
72 changed files with 9 additions and 0 deletions
56
nvim/lua/plugs/codecompanion.lua
Normal file
56
nvim/lua/plugs/codecompanion.lua
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
return {
|
||||
"olimorris/codecompanion.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
{ 'echasnovski/mini.diff', version = false },
|
||||
{ "stevearc/dressing.nvim", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
require("codecompanion").setup({
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
inline = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
agent = {
|
||||
adapter = "copilot",
|
||||
},
|
||||
},
|
||||
adapters = {
|
||||
copilot = function() return require("codecompanion.adapters").extend("copilot", {}) end,
|
||||
},
|
||||
display = {
|
||||
diff = {
|
||||
provider = "mini_diff",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
log_level = "DEBUG",
|
||||
},
|
||||
})
|
||||
|
||||
local keymaps = {
|
||||
n = {
|
||||
["<Leader>ci"] = { cmd = "<cmd>CodeCompanion<cr>" },
|
||||
["<Leader>cc"] = { cmd = "<cmd>CodeCompanionChat toggle<cr>" },
|
||||
["<Leader>cm"] = { cmd = "<cmd>CodeCompanion /commit<cr>" },
|
||||
},
|
||||
v = {
|
||||
["<Leader>ci"] = { cmd = "<cmd>CodeCompanion<cr>" },
|
||||
["ga"] = { cmd = "<cmd>CodeCompanionAdd<cr>" },
|
||||
["<Leader>ce"] = { cmd = "<cmd>CodeCompanion /explain<cr>" },
|
||||
["<Leader>cf"] = { cmd = "<cmd>CodeCompanion /fix<cr>" },
|
||||
["<Leader>ct"] = { cmd = "<cmd>CodeCompanion /tests<cr>" },
|
||||
}
|
||||
}
|
||||
local utils = require("utils")
|
||||
utils.add_opts_to_all_mappings(keymaps, { silent = true })
|
||||
utils.add_keymaps(keymaps)
|
||||
|
||||
vim.cmd([[cab cc CodeCompanion]])
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue