-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
plugins/which-key: migrate to mkNeovimPlugin #1990
Conversation
e60b241
to
a8ae43e
Compare
TBH, 90% of users probably don't have much config in which-key, other than registrations. I don't think we have to gracefully transition all changes to the v3 scheme. Rather
IMO this can be a
Here's one example: nixvim/plugins/utils/indent-blankline.nix Lines 19 to 112 in 5922a48
Note: it's preferred to rename each of the old options, instead of a group of them as otherwise the camelCase/snake_case transformation won't happen for options nested within the group. If you want anything more bespoke, such as a completely different name, you can manually use
This is another reason why it's usually better to rename each option rather than a common path containing a group of options. EDIT: To clarify, renaming a group of options is fine if none of the sub-options are camelCase and you don't need a bespoke rename for any of them.
Without looking at the actual code (yet), I think renaming all the options is probably better.
Thanks for working on this! Don't hesitate to ping as and when you have any questions/issues or would like a code review. |
697fee0
to
5011562
Compare
2e518a1
to
89330a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've focused this review on the window
deprecation. The rest of the changes I've only really skimmed over (so far), but overall they're looking good!
22d0502
to
6ca176b
Compare
Last push is removing the graceful deprecation of |
4d584ac
to
573f241
Compare
Made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your continued contributions!
This is looking pretty good, I've tried to focus more on the detail and pick out any nits with this review. The PR is looking more or less done.
It's up to you, but I still wonder if some of the more "internal" feeling options should be omitted from settingsOptions
? As discussed before, you can make the judgement call of which options you wish to support until we come up with a policy agreed on by all maintainers.
24c16fb
to
5a7d908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we're down to the final nits now! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more issues from me!
I'm still uncomfortable with having option declarations for all settings-options, but I'm fine with it in the short term if @khaneliman is comfortable maintaining them.
@GaetanLepage @traxys any final feedback before we merge?
@khaneliman thanks again for all your efforts!
All good for me. I had a quick browse of the changes and I haven't seen anything too fishy. Kudos to both of you for this chunky PR ! |
Working on converting this and there are a few breaking changes for data types of config options https://github.com/folke/which-key.nvim/pull/624/files#diff-a8347a13956b70b044d3e091cd3115e2fcfb44d4ebde516ff03223b2e84c7a7b.
- One being thetriggers
option which used to be string or list of strings, but is now a list of attribute sets like the registrations change. What should we do in that case?Very niche setting, continuing with breaking change.
- Another issue I was hoping for clarification on is nested properties moving to settings and moving to a different path within settings.Resolved, most can be just parent level rename. Manually specified those that wouldn't be handled properly for nested.
-plugins -> presets -> textObjects
moved and changed from camel to snake case. Does that get handled from the normaloptionsRenamedToSettings
?^
-windows -> winblend
moved towin -> wo -> winblend
. i'm unable to make amkRenamedOption
for that while also using theoptionsRenamedToSettings
for the parent object because of the order of evaluation, it seems. Will I need to explicitly remap all of those or just handle the deprecation like registrations and support forwarding the previous config through, for now?Created a deprecation warning for the window setting, dont need to worry about the child setting since it's mentioned in the warning that the options have changed.
Lots of TODO notes and some temporary test stuff for testing out renaming and warnings that can be ignored/questions answered