From cfc902089650dc52309a2f445fefbf7601078b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owicz?= Date: Fri, 29 Mar 2024 19:35:21 +0100 Subject: [PATCH] feat(extras): add neogen --- lua/lazyvim/plugins/extras/editor/neogen.lua | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/neogen.lua diff --git a/lua/lazyvim/plugins/extras/editor/neogen.lua b/lua/lazyvim/plugins/extras/editor/neogen.lua new file mode 100644 index 00000000..95e0b71a --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/neogen.lua @@ -0,0 +1,45 @@ +return { + { -- documentation generator + "danymat/neogen", + opts = { enabled = true }, + keys = { + { + "cnc", + function() + require("neogen").generate({ type = "class" }) + end, + desc = "Generate documentation for class", + }, + { + "cnf", + function() + require("neogen").generate({ type = "func" }) + end, + desc = "Generate documentation for function", + }, + { + "cnF", + function() + require("neogen").generate({ type = "file" }) + end, + desc = "Generate documentation for file", + }, + { + "cnt", + function() + require("neogen").generate({ type = "type" }) + end, + desc = "Generate documentation for type", + }, + }, + }, + + { -- which-key integration + "folke/which-key.nvim", + opts = { + defaults = { + ["cn"] = { name = "+neogen" }, + }, + }, + }, +}