Skip to content

Commit

Permalink
feat: honor timeoutlen when typing an operator followed by i or a ins…
Browse files Browse the repository at this point in the history
…tead of showing immediately
  • Loading branch information
folke committed Apr 29, 2021
1 parent 1b2ec76 commit 54d1b3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/which-key/keys.lua
Expand Up @@ -11,7 +11,9 @@ function M.setup()
local builtin_ops = require("which-key.plugins.presets").operators
local mappings = {}
for op, label in pairs(Config.options.operators) do
if builtin_ops[op] then mappings[op] = { name = label } end
if builtin_ops[op] then
mappings[op] = { name = label, i = { name = "inside" }, a = { name = "around" } }
end
end
M.register(mappings, { mode = "n" })
M.register({ i = { name = "inside" }, a = { name = "around" } }, { mode = "v" })
Expand Down

0 comments on commit 54d1b3a

Please sign in to comment.