-
Notifications
You must be signed in to change notification settings - Fork 166
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
feat(win): use which-key for toggle_help when available #745
base: main
Are you sure you want to change the base?
Conversation
a549adf
to
1d780f3
Compare
Scrolling the |
@dpetka2001 good catch! I'll dig into why / how it works in normal windows, where it takes over those mappings when they collide. Providing an option is definitely something I thought about, but would like to discuss it further. I mean, it'd be easy, but So my thinking was: if a user already "opted in" to using That said, it may be a good idea to expose |
I've seen lots of strange stuff from users. Making it configurable would avoid any future issues. Some people might still prefer the builtin help menu instead of the |
Ja |
with the current implementation calling the toggle_help function a second time doesn't hide it. From what I can see in the you call the show function every time, perhaps a check to see if which_key is already active can solve this |
why not do something like this and leave the user the option to bind it to whatever they want return {
"folke/snacks.nvim",
opts = {
picker = {
-- default unless overridden, can be placed inside any picker
win = {
input = {
keys = {
["<F12>"] = {
function()
require("which-key").show({ global = false })
end,
desc = "Show which-key",
mode = { "n" },
},
},
},
},
},
},
} |
Description
Leverage
which-key
to show the help window when available.Related Issue(s)
N/A
Screenshots
Screen.Recording.2025-01-24.at.13.00.03.mov
Screen.Recording.2025-01-24.at.13.01.02.mov