feat: Add default
option for fallback theme
#28
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 PR adds a default option that is used in case the system theme is not detected (before it got set to light mode, which I suspect is not usually the desired behaviour). This only applies to Linux since, afaict, macOS and Windows always have some option enabled.
This is useful in desktop-less environments (e.g., a server) and some linux environments (e.g., it was unclear to me how to set it up in Hyprland).
In my case, I was using this plugin on my macOS setup and it worked perfectly, then I tried it on a server to edit files locally and it blasted me with light mode so I had to disable it. Then I installed Linux with Hyprland and it was hard to figure out how to set the xorg setting, so I had to also disable it there. This PR will hopefully help with neovim setups that work consistently across the board! 😁
The
default
option name might need a bit of bikeshedding. Potential alternatives aredefault_theme
(which I don’t particularly like) andfallback
(which I do like). Feel free to use whichever you prefer :)Also, docs need to be written and perhaps the README needs to be updated. However, I'm not sure exactly where they would go since there is not the usual "configuration" section in neither.