[Nvim] gen

This commit is contained in:
coja
2026-04-11 01:43:20 +02:00
parent f413a68803
commit e7da0a5f93
2 changed files with 21 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ dofile(vim.g.base46_cache .. "statusline")
require "options"
require "nvchad.autocmds"
require "gen"
vim.schedule(function()
require "mappings"

View File

@@ -48,6 +48,26 @@ return {
result_filetype = "markdown", -- Configure filetype of the result buffer
debug = false, -- Prints errors and the command which is run.
},
config = function(_, opts)
require("gen").setup(opts)
local prompts = require("gen").prompts
prompts["Markdown_links"] = {
prompt = "Make markdown links wherever you find link in the following text, and generate the namas accordingly:\n$text",
replace = true,
}
prompts["Optimize code"] = {
prompt = "Check if code can be optimized for speed and readability:\n$text",
replace = true,
}
prompts["Genetrate types "] = {
prompt = "Check if types are correct in this code, fix and optimize if something is needed:\n$text",
replace = true,
}
end,
},
{
"MeanderingProgrammer/render-markdown.nvim",