Closed textzenith closed 1 year ago
the g
key works fine with my config.
return {
'folke/which-key.nvim',
event = 'BufReadPre',
config = function()
-- disable hints for certain operators
local presets = require 'which-key.plugins.presets'
presets.operators['v'] = nil
presets.operators['c'] = nil
presets.operators['d'] = nil
presets.operators['y'] = nil
local wk = require 'which-key'
wk.setup {}
wk.register({
b = { name = 'Buffer' },
f = { name = 'Telescope' },
g = { name = 'LSP Actions' },
t = { name = 'Trouble' },
}, { prefix = '<leader>' })
end,
}
I can confirm, there are no g; and g, keybindings in WhichKey table
Moreover, I noticed some other vanilla vim keybindings are missing, such as
As a side note, i noticed some quirks with WhichKey displayed keymaps:
:chekhealth which-key
, found out I have some conflicting keymappings ('ys' and 'yS' from nvim-surround, 'gc' and 'gb' from Comment.nvim), I got confused because nothing should use those keymaps except for these corresponding plugins, My config:
{
"folke/which-key.nvim",
event = "BufReadPre",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
config = function ()
local wk = require 'which-key'
wk.setup {}
wk.register({
f = { name = 'Telescope' },
t = { name = 'Trouble' },
v = {
name = 'Git',
v = 'LazyGit',
f = 'Fugitive',
},
}, { prefix = '<leader>' })
end
}
The which-key presets don't include ALL the mappins, since that would make which-key kinda useless.
If you want more standard mappings, you can always add them in yourself.
I also would like to add some missing key bindings to the popup (i.e. gw
to auto-wrap keys). How would I do that (sorry, I read the README but still can't figure out the right way to achieve this).
The which-key presets don't include ALL the mappins, since that would make which-key kinda useless.
I don't understand, why would that make which-key useless? Wouldn't it make which-key more useful?
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9
Operating system/version
Ubuntu
Describe the bug
Hi, I've been loving using
which-key
, but as I learn more about Vim / Neovim it's come to my attention that a lot of lesser known / used shortcuts are missing from the pop-ups — I'm talking about keys native to Vim, as well (all my plugin keys are showing as expected!)One example lately is that I couldn't remember what the key bindings are to go back / forward through the changelist. I knew it was
g
-something, so I typed g, but the mappings I was looking for weren't there. This caused me to waste a lot of time searching through other key prefixes before I realized that which-key.nvim simply doesn't show them under g.It's such a cool and useful pair of mappings, I can't figure out why they aren't listed.
Moreover, most g-prefixed commands actually aren't there.
As I want to use which-key.nvim to remember / discover obscure and lesser-used keymaps, it sabotages a large part of the expected functionality of the plugin, and causes me to think there aren't as many awesome keybindings in Neovim as there actually are.
I've searched the docs and can't find any mention of this 'feature', nor how to fix it. If you have a plugin to teach keymaps, and you are under-selling the true number of keymaps, this is something that should be mentioned prominently in the README, near the very top!
OK, sorry if I sound dramatic, I'm really enjoying using which-key and looking forward to any help or feedback on getting ALL built-in keybindings to appear. Thanks! 😺
Steps To Reproduce
Press g
Expected Behavior
See ; and , bindings
Repro
No response