From aa4be8c286293090b06d9efda1582c85528f3b68 Mon Sep 17 00:00:00 2001 From: CMOISDEAD Date: Tue, 16 Apr 2024 12:10:06 -0500 Subject: [PATCH] fix(neogen): keymap for type-aware automatic comment generation Keyboard shortcut for automatic comment generation did not correctly detect element type (function, class, etc.). This commit fixes the bug so that the shortcut correctly detects element type and generates the appropriate comment. --- lua/astrocommunity/editing-support/neogen/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/astrocommunity/editing-support/neogen/init.lua b/lua/astrocommunity/editing-support/neogen/init.lua index e347117b4..e5f7a61a4 100644 --- a/lua/astrocommunity/editing-support/neogen/init.lua +++ b/lua/astrocommunity/editing-support/neogen/init.lua @@ -8,7 +8,7 @@ return { local maps = opts.mappings local prefix = "a" maps.n[prefix] = { desc = require("astroui").get_icon("Neogen", 1, true) .. "Annotation" } - maps.n[prefix .. ""] = { function() require("neogen").generate { type = "current" } end, desc = "Current" } + maps.n[prefix .. ""] = { function() require("neogen").generate { type = "any" } end, desc = "Current" } maps.n[prefix .. "c"] = { function() require("neogen").generate { type = "class" } end, desc = "Class" } maps.n[prefix .. "f"] = { function() require("neogen").generate { type = "func" } end, desc = "Function" } maps.n[prefix .. "t"] = { function() require("neogen").generate { type = "type" } end, desc = "Type" }