Skip to content

Commit

Permalink
fix: added hidden option to disable the popup on motion counts (motio…
Browse files Browse the repository at this point in the history
…ns.count)
  • Loading branch information
folke committed May 15, 2021
1 parent 840311c commit ea975ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/which-key/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ local defaults = {
-- add operators that will trigger motion and text object completion
-- to enable all native operators, set the preset / operators plugin above
operators = { gc = "Comments" },
motions = {
count = true,
},
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "", -- symbol used between a key and it's label
Expand Down
3 changes: 3 additions & 0 deletions lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function M.process_motions(ret, mode, prefix, buf)
if op_count == "0" then
op_count = nil
end
if Config.options.motions.count == false then
op_count = nil
end
if op_count then
op_prefix = op_prefix:sub(#op_count + 1)
end
Expand Down

0 comments on commit ea975ef

Please sign in to comment.