-
Notifications
You must be signed in to change notification settings - Fork 381
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
feature: Stable API for retrieving keymap definitions #1133
Comments
I just responded to your PR. You can get the plugin's keymaps with: local keys = plugin._.handlers.keys or {} So you no longer need to use the internal I can't promise this will always remain where it is now.
|
Sounds good. Thanks for the context and PR comment! |
One caveat. But maybe better to add an extra check there just in case :) |
It looks like, at the time |
Ah right, yes, |
Did you check the docs?
Is your feature request related to a problem? Please describe.
Hi, feel free to close if you feel its out of scope or not planned etc.
I was just wondering if you'd consider supporting a stable, public API for retrieving keymap tables from plugin specs.
In legendary.nvim I've got an extension that auto-loads all keymaps defined via
lazy.nvim
intolegendary
. I got the original implementation from you in GitHub Discussions.However, yesterday, there was a breaking change in the API, so I fixed it with this PR. It seems like this is a private API which doesn't necessarily remain stable.
Describe the solution you'd like
A simple, public API for grabbing all keymaps defined in plugin specs, maybe something like this?
Describe alternatives you've considered
PR to fix when there's breaking changes. Which is fine if you decide that's the answer.
Additional context
No response
The text was updated successfully, but these errors were encountered: