Lots of work still needed to be able to use the llm effectively. But its

a start
This commit is contained in:
Daniel Weber 2025-01-05 21:59:05 -05:00
parent b17eac308a
commit ba187eae92
2 changed files with 31 additions and 0 deletions

30
after/plugin/llm.lua Normal file
View File

@ -0,0 +1,30 @@
require("codecompanion").setup({
adapters = {
llama3_2 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "llama3_2", -- Give this adapter a different name to differentiate it from the default ollama adapter
schema = {
model = {
default = "llama3.2:latest",
},
},
})
end,
},
strategies = {
chat = {
adapter= "llama3_2",
},
inline = {
adapter="llama3_2",
}
}
})
vim.api.nvim_set_keymap("v", "<leader>ce", "", {
callback = function()
require("codecompanion").prompt("explain")
end,
noremap = true,
silent = true,
})

View File

@ -27,6 +27,7 @@ require("lazy").setup({
},
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
{ "olimorris/onedarkpro.nvim", priority = 1000}, -- Ensure it loads first
{"olimorris/codecompanion.nvim"},
{ "zootedb0t/citruszest.nvim", lazy = false, priority = 1000, },
{'norcalli/nvim-colorizer.lua'},
{