From 1ea8fb6323a541e23c605b9bde118a7496aeccc2 Mon Sep 17 00:00:00 2001 From: chuyanlong Date: Fri, 10 Oct 2025 14:12:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/lazyvim/plugins/extras/coding/neogen.lua | 32 ++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/neogen.lua b/lua/lazyvim/plugins/extras/coding/neogen.lua index c8916676..856b7e9a 100644 --- a/lua/lazyvim/plugins/extras/coding/neogen.lua +++ b/lua/lazyvim/plugins/extras/coding/neogen.lua @@ -5,11 +5,37 @@ return { keys = { { "cn", - function() - require("neogen").generate() - end, + "", desc = "Generate Annotations (Neogen)", }, + { + "cnf", + function() + require("neogen").generate({ type = "func" }) + end, + desc = "Generate func Annotations (Neogen)", + }, + { + "cnc", + function() + require("neogen").generate({ type = "class" }) + end, + desc = "Generate class Annotations (Neogen)", + }, + { + "cnt", + function() + require("neogen").generate({ type = "type" }) + end, + desc = "Generate type Annotations (Neogen)", + }, + { + "cne", + function() + require("neogen").generate({ type = "file" }) + end, + desc = "Generate file Annotations (Neogen)", + }, }, opts = function(_, opts) if opts.snippet_engine ~= nil then