Open
Conversation
Author
|
I'm pushing this up now to mostly get feedback. This approach works and you can test it yourself with the following theme file (github won't let me upload.toml files): The following need to be discussed/resolved before merging:
I'm a new face so I'm happy to bend to the will of whoever maintains/owns this project and I'm also happy to change the approach if needed. |
Author
|
I decided to add a commit that fixes the |
This commit adds a generic way of changing the color based on mode from the theme struct. This saves us from having to implement a match statement under every render function and makes the code rather readable whilst adding a lot more customisation to the user. All theme options now support adding ".insert", ".select" and ".normal" to the key, and will apply those color/style choices directly. Specifying the theme key without those suffixes will be used as a fallback. So current themes should still work as expected.
d28f15b to
e665b78
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a generic way of changing the color based on mode from the theme struct. This saves us from having to implement a match statement under every render function and makes the code rather readable whilst adding a lot more customisation to the user.
All theme options now support adding ".insert", ".select" and ".normal" to the key, and will apply those color/style choices directly. Specifying the theme key without those suffixes will be used as a fallback. So current themes should still work as expected.