Skip to content

feat(themes): modular plug-n-play colorscheme system#33

Merged
venkatarenduchintala merged 1 commit into
mainfrom
feat/modular-plug-n-play-themes
Jul 1, 2026
Merged

feat(themes): modular plug-n-play colorscheme system#33
venkatarenduchintala merged 1 commit into
mainfrom
feat/modular-plug-n-play-themes

Conversation

@venkatarenduchintala

Copy link
Copy Markdown
Owner

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 (including gruvbox with its original hard/high-contrast tuning).
  • lua/theme.lua — rewritten as an auto-discovering loader. It scans lua/themes/*.lua, keeps the existing public API (colors, set_active_theme, get_active_theme, theme_name) so bufferline, scrollbar and plugins/init.lua keep working, persists the active choice to a machine-local state file, and adds a :Theme command with completion. Only the active theme plugin is ever installed.
  • lua/plugins/configs/lualine.lua — statusline switched to theme = "auto" so the bar follows any colorscheme (the previous theme_name string 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 (requires lush.nvim).

Usage

  • Add a theme → drop a file in lua/themes/. No central edits.
  • Switch → :Theme <name> (tab-completes), then restart (lazy installs it on next launch).
  • Default still set in settings.lua via set_active_theme(...); a :Theme choice overrides it.

Validation

  • luac -p on all 20 changed files — clean.
  • Headless loader tests: 18 themes discovered, resolve + persist + unknown-name guard all pass.
  • Full devcontainer CI suite run locally (Neovim v0.12.3): green (exit 0), startup + full plugin load + all 11 treesitter parsers pass.

Note (out of scope)

Discovered that the CI reports green while swallowing headless Lua errors (nvim --headless -c qall exits 0 after an error). Pre-existing, unrelated to this change; left as-is per discussion. Candidate for a follow-up PR (switch to nvim -l, add theme launch tests, fix after/lsp/*.lua to the 0.12 return {...} form).

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).
@venkatarenduchintala venkatarenduchintala merged commit 70b7b21 into main Jul 1, 2026
2 checks passed
@venkatarenduchintala venkatarenduchintala deleted the feat/modular-plug-n-play-themes branch July 1, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant