Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
fix(whichkey): Not showing all keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
connorgmeean committed Sep 22, 2022
1 parent 99f5a78 commit 8e01af1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/doom/modules/features/whichkey/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ whichkey.configs["which-key.nvim"] = function()
keymaps[v] = {}
end
-- If this is a keymap group
if type(node.rhs) == "table" then
local rhs_type = type(node.rhs)
if rhs_type == "table" then
keymaps[v][node.lhs] = { name = node.name }
-- If this is an actual keymap
elseif type(node.rhs) == "string" then
elseif rhs_type == "string" or rhs_type == "function" then
keymaps[v][node.lhs] = { node.name }
end
end
Expand All @@ -111,6 +112,7 @@ whichkey.configs["which-key.nvim"] = function()
for k, v in pairs(keymaps) do
require("which-key").register(v, { mode = k })
end
keymaps = {}
end

return module
Expand Down

0 comments on commit 8e01af1

Please sign in to comment.