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" }, + }, + }, + }, +}