Skip to content

Commit

Permalink
fix: add delay option to macro key (#152) (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
HerringtonDarkholme committed Oct 22, 2021
1 parent a35a910 commit bd226c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/which-key/plugins/registers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ M.name = "registers"

M.actions = {
{ trigger = '"', mode = "n" },
{ trigger = "@", mode = "n" },
{ trigger = "@", mode = "n", delay = true },
{ trigger = "<c-r>", mode = "i" },
{ trigger = "<c-r>", mode = "c" },
}

function M.setup(_wk, _config, options)
for _, action in ipairs(M.actions) do
table.insert(options.triggers_nowait, action.trigger)
if not action.delay then
table.insert(options.triggers_nowait, action.trigger)
end
end
end

Expand Down

0 comments on commit bd226c4

Please sign in to comment.