✨ feat(nvim): new extra: codecompanion.nvim
This commit is contained in:
parent
8fe4f238da
commit
1d290117c4
3 changed files with 57 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "07fae0a420d19a865c16895c93525fcdabf62fff" },
|
||||
"codeium.vim": { "branch": "main", "commit": "8bed5fb5708c94cd69f418d1381d6fbf07cb0313" },
|
||||
"codesnap.nvim": { "branch": "main", "commit": "c2924bf6c9a2c2c03318fae9b7fe0706412b9d9c" },
|
||||
"compiler.nvim": { "branch": "main", "commit": "e889774c7f2fefad60f8e6638d324223b07d2624" },
|
||||
|
@ -25,7 +26,6 @@
|
|||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||
"garbage-day.nvim": { "branch": "main", "commit": "4a1160bfffb2f499fb55a54333f29d160ab3c8a1" },
|
||||
"gen.nvim": { "branch": "main", "commit": "c404e217e1e0deb1f1aaa9e9ff61fc3e3c23efbe" },
|
||||
"gitsigns-yadm.nvim": { "branch": "main", "commit": "7400593e0155ed919ddb25fa21daac9fb6552019" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
|
||||
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
|
||||
|
@ -72,7 +72,7 @@
|
|||
"nvim-puppeteer": { "branch": "main", "commit": "cf70611be5056a24baa2278df9366a5b02cd32c1" },
|
||||
"nvim-recorder": { "branch": "main", "commit": "ce96792c1ff750977fc3affc56f0561b0c20a7e2" },
|
||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "04401b5dd17c3419dae5141677bd256f52d54733" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "e085c614fcd716eedb8e2e55bae2ccad4becd40d" },
|
||||
"nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
|
||||
|
@ -90,7 +90,7 @@
|
|||
"refactoring.nvim": { "branch": "master", "commit": "c406fc5fb4d7ba5fce7b668637075fad6e75e9f8" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
|
||||
"search-replace.nvim": { "branch": "main", "commit": "d92290a02d97f4e9b8cd60d28b56b403432158d5" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "b518cfb5283a2da43fa9935e850ba9d77873453d" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "d39e1f1920c5c6772b716d6ee05fd3ffa82a0d2f" },
|
||||
"suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },
|
||||
"telescope-floaterm.nvim": { "branch": "main", "commit": "ccd3f40ae30dce5de0e5d0f5069e08e7d9ad6d23" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
"lazyvim.plugins.extras.editor.mini-move",
|
||||
"lazyvim.plugins.extras.ui.edgy",
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"plugins.extras.coding.ai.codecompanion",
|
||||
"plugins.extras.coding.ai.codeium",
|
||||
"plugins.extras.coding.ai.gen",
|
||||
"plugins.extras.coding.annotation",
|
||||
"plugins.extras.coding.cmp-extended",
|
||||
"plugins.extras.coding.multicursor",
|
||||
|
|
53
.config/nvim/lua/plugins/extras/coding/ai/codecompanion.lua
Normal file
53
.config/nvim/lua/plugins/extras/coding/ai/codecompanion.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
local prefix = "<leader>a"
|
||||
local user = vim.env.USER or "User"
|
||||
|
||||
return {
|
||||
{
|
||||
"olimorris/codecompanion.nvim",
|
||||
cmd = { "CodeCompanion", "CodeCompanionActions", "CodeCompanionToggle", "CodeCompanionAdd", "CodeCompanionChat" },
|
||||
opts = {
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = "ollama",
|
||||
roles = {
|
||||
llm = " CodeCompanion",
|
||||
user = " " .. user:sub(1, 1):upper() .. user:sub(2),
|
||||
},
|
||||
keymaps = {
|
||||
close = { modes = { n = "q", i = "<C-c>" } },
|
||||
stop = { modes = { n = "<C-c>" } },
|
||||
},
|
||||
},
|
||||
inline = { adapter = { adapter = "ollama" } },
|
||||
agent = { adapter = { adapter = "ollama" } },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ prefix .. "a", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "Action Palette" },
|
||||
{ prefix .. "c", "<cmd>CodeCompanionChat<cr>", mode = { "n", "v" }, desc = "New Chat" },
|
||||
{ prefix .. "A", "<cmd>CodeCompanionAdd<cr>", mode = "v", desc = "Add Code" },
|
||||
{ prefix .. "i", "<cmd>CodeCompanion<cr>", mode = "n", desc = "Inline Prompt" },
|
||||
{ prefix .. "C", "<cmd>CodeCompanionToggle<cr>", mode = "n", desc = "Toggle Chat" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "ai", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/edgy.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
opts.right = opts.right or {}
|
||||
table.insert(opts.right, {
|
||||
ft = "codecompanion",
|
||||
title = "CodeCompanion",
|
||||
size = { width = 70 },
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Reference in a new issue