Skip to content

Commit

Permalink
fix: mapleader=\
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 2, 2021
1 parent 41636a3 commit b5c8985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function M.hook_add(prefix, mode, buf, secret_only)
-- hook up if needed
if not M.hooked[id] and not M.hooked[id_global] then
local cmd = [[<cmd>lua require("which-key").show(%q, {mode = %q, auto = true})<cr>]]
if vim.g.mapleader == "\\" then prefix = prefix:gsub("<leader>", "\\") end
if vim.g.mapleader == "\\" then prefix = prefix:gsub("<[lL]eader>", "\\") end
cmd = string.format(cmd, prefix, mode)
-- map group triggers and nops
-- nops are needed, so that WhichKey always respects timeoutlen
Expand Down

0 comments on commit b5c8985

Please sign in to comment.