Skip to content

Commit c821fb6

Browse files
committed
feat: WhichKey command displays keymaps for current mode. Fixes #914.
1 parent 5bf7a73 commit c821fb6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/which-key/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function M.setup(opts)
310310
return require("which-key.util").error("Usage: WhichKey [mode] [keys]")
311311
end
312312
if mode == "" then
313-
mode = "n"
313+
mode = vim.api.nvim_get_mode().mode
314314
end
315315
require("which-key").show({ mode = mode, keys = keys })
316316
end, {

0 commit comments

Comments
 (0)