Skip to content

Commit

Permalink
fix(neogen): keymap for type-aware automatic comment generation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CMOISDEAD committed Apr 16, 2024
1 parent 37e6d23 commit aa4be8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/astrocommunity/editing-support/neogen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ return {
local maps = opts.mappings
local prefix = "<Leader>a"
maps.n[prefix] = { desc = require("astroui").get_icon("Neogen", 1, true) .. "Annotation" }
maps.n[prefix .. "<CR>"] = { function() require("neogen").generate { type = "current" } end, desc = "Current" }
maps.n[prefix .. "<CR>"] = { 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" }
Expand Down

0 comments on commit aa4be8c

Please sign in to comment.