feat(themes): modular plug-n-play colorscheme system#33
Merged
Conversation
Move each colorscheme into its own lua/themes/<name>.lua spec and rewrite lua/theme.lua as an auto-discovering loader. Adding a theme is now drop-in (no central table edit); switching is `:Theme <name>`, persisted to a machine-local state file and applied on the next launch. Only the active theme plugin is installed. Add five low-eyestrain dark themes: gruvbox_material_soft, everforest, kanagawa, tokyonight_moon and zenbones (requires lush.nvim). Switch lualine to theme="auto" so the statusline follows any active colorscheme; the previous theme_name string errors on themes without a matching lualine theme (e.g. zenbones, tokyonight_moon).
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.
What
Refactors the theme configuration into a plug-n-play, one-file-per-theme system.
lua/themes/<name>.lua— each colorscheme is now its own file returning a lazy.nvim spec. The 13 existing themes are migrated verbatim (includinggruvboxwith its original hard/high-contrast tuning).lua/theme.lua— rewritten as an auto-discovering loader. It scanslua/themes/*.lua, keeps the existing public API (colors,set_active_theme,get_active_theme,theme_name) sobufferline,scrollbarandplugins/init.luakeep working, persists the active choice to a machine-local state file, and adds a:Themecommand with completion. Only the active theme plugin is ever installed.lua/plugins/configs/lualine.lua— statusline switched totheme = "auto"so the bar follows any colorscheme (the previoustheme_namestring errors on themes without a matching lualine theme, e.g.zenbones,tokyonight_moon).New low-eyestrain dark themes
Added five medium-contrast, warm, desaturated themes:
gruvbox_material_soft,everforest,kanagawa,tokyonight_moon,zenbones(requireslush.nvim).Usage
lua/themes/. No central edits.:Theme <name>(tab-completes), then restart (lazy installs it on next launch).settings.luaviaset_active_theme(...); a:Themechoice overrides it.Validation
luac -pon all 20 changed files — clean.Note (out of scope)
Discovered that the CI reports green while swallowing headless Lua errors (
nvim --headless -c qallexits 0 after an error). Pre-existing, unrelated to this change; left as-is per discussion. Candidate for a follow-up PR (switch tonvim -l, add theme launch tests, fixafter/lsp/*.luato the 0.12return {...}form).