which-key.nvim
which-key.nvim copied to clipboard
[Question]: Operator black hole not registering
All of the other operators (i.e, g, y, c, and v) work just fine. However, I have remapped d to "_d because I do not want to copy what I delete to my clipboard, and the operator window will not appear unless the mapping is removed.
I've tried the following:
- Placing the mapping before and after this
local presets = require("which-key.plugins.presets")
presets.operators['"_d'] = "Delete blackhole"
- Trying to somehow mimic the operator behavior in the source code
wk.register(
{
["d"] = {[["_d]], "Delete blackhole"}
},
{prefix = "", preset = true}
)
- Setting it in the
.setup()call
wk.setup({
operators = {
gc = "Comments",
['"_d'] = "Delete (blackhole)",
-- ['d'] = "Delete (blackhole 2)" -- I tried both here
},
})
I was not able to directly get d to trigger the operator popup window. I was able to get the key sequence that is being bound to d to show the popup window. That is, whenever I would press "_d manually, the popup window would appear and it would not copy it to my clipboard.
I'm unsure how to change this behavior.