my_nvim_config/after/plugin/llm.lua

31 lines
684 B
Lua
Raw Normal View History

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,
})