-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include description on keybinds #47
Comments
@Hudison I think this is an excellent idea. One moment... |
@Hudison so I've done that now (it didn't take long ;) ). Hopefully that's a good quality-of-life improvement. I don't use Thanks for highlighting the request, and hope you're enjoying using the plugin. (Oh and let me know if you have any improvements to the descriptions I've added, I tried to keep them brief but clear...) |
@andrewferrier Thank you for the quick response and improvement. I like which-key a lot since I'm new to neovim, and that helps me a lot with remembering things, especially the possible available things after a command. The descriptions in my opinion are on point, on my editor I can see the full description, so I think they are clear and succinct. Thank you again for the response and for the very handy plugin. |
Do it like this: table.insert(M, {
"andrewferrier/debugprint.nvim",
config = function()
local opts = {
create_keymaps = false,
create_commands = false,
}
require("debugprint").setup(opts)
local fn = function ()
-- Note: setting `expr=true` and returning the value are essential
-- It's also important to use motion = true for operator-pending motions
return require("debugprint").debugprint({ motion = true, variable = true })
end
require("which-key").register({
d = { fn, "Debug Print" }
}, {
mode = "n",
prefix = "<leader>",
buffer = nil,
expr = true,
silent = true,
noremap = true,
nowait = true,
})
end,
}) |
@aemonge that's certainly an option, thanks. Worth clarifying that I've added the descriptions to |
I recently got this plugin recommended by a friend and I use which-key, when I asked what the key binds are, he said
g?
and look at the description in which-key, the thing is that there is no description for the key binds. Since it's a very simple and fast change, that makes it more user-friendly, not only for which-key, but also when you search for the keybindings available.My suggestion is to just add the
desc
property on the default key binds.The text was updated successfully, but these errors were encountered: