-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
colorschemes/base16: add settings + refactor to fix #1675 #1676
Conversation
cf2add6
to
2782fa7
Compare
Turns out the This is good, because we don't need any new warnings or changed behaviour! |
802d21c
to
c9dd15b
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.
theme-list
is probably still too long for the docs. Feel free to suggest more removals.
5cde820
to
40ce354
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.
Ok, this is looking good !
Sorry for taking so long...
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Added support for the plugin's "advanced" config settings. Removed the enum restriction and prefix concatenation, allowing anything to be passed through, including raw lua: fixes nix-community#1675 The theme list is now much shorter and is included directly in the option description. Some general cleanup, in particular to `extraConfig` and `customColorschemeType`.
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at c0ea106 |
Removed the enum restriction on the
colorscheme
option, allowing anything to be passed through, including raw lua. This fixes #1675Settings
Added support for the plugin's "advanced" config settings and simplified the
extraConfig
implementation.As some of their API is undocumented, I've opened RRethy/base16-nvim#102. Should we wait for acknowledgement?
Enum
Previously, we listed all builtin base16 colorschemes in theme-list.nix, however this means we have to maintain that list, ensuring it tracks any upstream changes.
Also worth noting that upstream don't always have their docs up to date. I've opened a PR to hopefully address this: RRethy/base16-nvim#103.
Having a ~240 value enum type wasn't particularly readable though, anyway...
Current documentation (screenshot)
Refactor
I've cleaned up some of the implementation. In particular, I found a more readable way to define
customColorschemeType
usingstringToCharacters
andgenAttrs
mapAttrs
on the example attrs.Rename
EDIT: this section is irrelevant now that we know the lua API (
setup
) doesn't use thebase16-
prefix.Details
I toyed with renaming the option to
colors
to match upstream's internal name, and to allow automatically apply the prefix to be done only when the old name was used.In the end I decided the rename wasn't worth it. Let me know if you disagree.