aboutsummaryrefslogtreecommitdiffstats
path: root/lua/plugins/codecompanion.lua
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2025-01-31 14:21:32 -0300
committerElvis Claros Castro <elvis@claros.ar>2025-01-31 14:21:32 -0300
commit65eb48ffcdb0aa7a0245b462b860b0f9c2c6d906 (patch)
tree9c0261d184ed5e7c2ae59192f353f1a004b857fd /lua/plugins/codecompanion.lua
parentf27115f7c053d1d8e4b2af4b7506210fffc51c95 (diff)
downloadnvim-conf-65eb48ffcdb0aa7a0245b462b860b0f9c2c6d906.tar.gz
nvim-conf-65eb48ffcdb0aa7a0245b462b860b0f9c2c6d906.zip
Feat: agrego vimtex
Diffstat (limited to 'lua/plugins/codecompanion.lua')
-rw-r--r--lua/plugins/codecompanion.lua41
1 files changed, 35 insertions, 6 deletions
diff --git a/lua/plugins/codecompanion.lua b/lua/plugins/codecompanion.lua
index 324f4d2..7fe6114 100644
--- a/lua/plugins/codecompanion.lua
+++ b/lua/plugins/codecompanion.lua
@@ -1,10 +1,6 @@
local IS_DEV = false
return {
{
- "nvim-treesitter/nvim-treesitter",
- opts = { ensure_installed = { "yaml", "markdown" } },
- },
- {
dir = IS_DEV and "~/Projects/research/codecompanion.nvim" or nil,
"olimorris/codecompanion.nvim",
dependencies = {
@@ -85,7 +81,7 @@ return {
env = {
api_key = "cmd:echo $OPENAI_API_KEY",
chat_url = "/v1/chat/completions",
- url = "http://127.0.0.1:8080",
+ url = "http://127.0.0.1:8012",
},
headers = {
["Content-Type"] = "application/json",
@@ -106,10 +102,43 @@ return {
},
})
end,
+ deepseek = function()
+ return require("codecompanion.adapters").extend("deepseek", {
+ env = {
+ api_key = "cmd:echo $OPENAI_API_KEY",
+ chat_url = "/v1/chat/completions",
+ url = "http://127.0.0.1:8000",
+ },
+ headers = {
+ ["Content-Type"] = "application/json",
+ },
+ schema = {
+ model = {
+ default = function()
+ return "davinci"
+ end,
+ },
+ },
+ })
+ end,
+ azure_openai = function()
+ return require("codecompanion.adapters").extend("azure_openai", {
+ env = {
+ api_key = "cmd:echo $AZ_DS_API_KEY",
+ endpoint = "https://DeepSeek-R1-nphob.eastus2.models.ai.azure.com",
+ },
+ schema = {
+ model = {
+ default = "DeepSeek-R1-nphob",
+ },
+ },
+ })
+ end,
},
+
strategies = {
chat = {
- adapter = "copilot",
+ adapter = "openai_compatible",
-- roles = { llm = " Copilot Chat", user = "IT Man" },
},
inline = { adapter = "copilot" },