This commit is contained in:
sankalp committed 2024-01-18 14:36:22 +05:45
1 parent 19d9347db9
commit 3ac528c554
72 files changed
+1734 -3140

No files matched your search

@@ -0,0 +1,29 @@
return {
"jellydn/gen.nvim",
opts = {
model = "codellama",
display_mode = "split",
show_prompt = true,
show_model = true,
no_auto_close = false,
init = function(options)
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
end,
command = "curl --silent --no-buffer -X POST http://localhost:11434/api/generate -d $body",
},
config = function(_, opts)
local gen = require("gen")
gen.setup(opts)
gen.prompts["Elaborate_Text"] = {
prompt = "Elaborate the following text:\n$text",
}
gen.prompts["Fix_Code"] = {
prompt = "Fix the following code. Only output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```",
extract = "```$filetype\n(.-)```",
}
end,
keys = {
{ "<leader>i", "<cmd>Gen<cr>", mode = { "n", "v" }, desc = "IA (Gen)" },
},
}