update gen plugin a bit
This commit is contained in:
parent
a92bb733db
commit
eecea2aa7b
1 changed files with 10 additions and 3 deletions
|
@ -13,6 +13,11 @@ return {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
opts = {
|
||||||
|
model = "wizard-vicuna-uncensored",
|
||||||
|
-- show_prompt = true,
|
||||||
|
show_model = true,
|
||||||
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local g = require("gen")
|
local g = require("gen")
|
||||||
g.setup(opts)
|
g.setup(opts)
|
||||||
|
@ -28,12 +33,14 @@ return {
|
||||||
g.prompts = {
|
g.prompts = {
|
||||||
-- https://github.com/David-Kunz/gen.nvim/blob/main/lua/gen/prompts.lua
|
-- https://github.com/David-Kunz/gen.nvim/blob/main/lua/gen/prompts.lua
|
||||||
Prompt_Code_Completion = {
|
Prompt_Code_Completion = {
|
||||||
prompt = "Write code that meets these requirements: $input\nOnly output the result in format ```$filetype\n...\n```",
|
prompt =
|
||||||
|
"Write code that meets these requirements: $input\nOnly output the result in format ```$filetype\n...\n```",
|
||||||
replace = true,
|
replace = true,
|
||||||
extract = "```$filetype\n(.-)```",
|
extract = "```$filetype\n(.-)```",
|
||||||
},
|
},
|
||||||
Replace_Code_Completion = {
|
Replace_Code_Completion = {
|
||||||
prompt = "Rewrite the following code, follow any comment instructions.\nOnly output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```",
|
prompt =
|
||||||
|
"Rewrite the following code, follow any comment instructions.\nOnly output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```",
|
||||||
replace = true,
|
replace = true,
|
||||||
extract = "```$filetype\n(.-)```",
|
extract = "```$filetype\n(.-)```",
|
||||||
},
|
},
|
||||||
|
@ -71,7 +78,7 @@ return {
|
||||||
mode = { "n", "v", "x" },
|
mode = { "n", "v", "x" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>xcc",
|
"<leader>xi",
|
||||||
"<cmd>Gen Prompt_And_Answer_Inline<cr>",
|
"<cmd>Gen Prompt_And_Answer_Inline<cr>",
|
||||||
desc = "Prompt and answer inline at cursor",
|
desc = "Prompt and answer inline at cursor",
|
||||||
mode = { "n", "v", "x" },
|
mode = { "n", "v", "x" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue