Skip to content

Commit

Permalink
fix: always use noremap=false for <plug> commands
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 29, 2021
1 parent 1bac978 commit 9b9cece
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ function M.register(mappings, opts)
noremap = mapping.opts.noremap,
nowait = mapping.opts.nowait or false,
}
if mapping.cmd:lower():sub(1, #("<plug>")) == "<plug>" then keymap_opts.noremap = false end
if mapping.buf ~= nil then
vim.api.nvim_buf_set_keymap(mapping.buf, mode, mapping.prefix, mapping.cmd, keymap_opts)
else
Expand Down

0 comments on commit 9b9cece

Please sign in to comment.