From e7da0a5f9372f020dbc6fbff03e473e2539fae04 Mon Sep 17 00:00:00 2001 From: coja Date: Sat, 11 Apr 2026 01:43:20 +0200 Subject: [PATCH] [Nvim] gen --- .config/nvim/init.lua | 1 + .config/nvim/lua/plugins/init.lua | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index af71982..891b0ca 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -32,6 +32,7 @@ dofile(vim.g.base46_cache .. "statusline") require "options" require "nvchad.autocmds" +require "gen" vim.schedule(function() require "mappings" diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua index 8b5224a..fb870d3 100644 --- a/.config/nvim/lua/plugins/init.lua +++ b/.config/nvim/lua/plugins/init.lua @@ -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",