Skip to content

plugins/theme: initial theming refactor - #1262

Open
NotAShelf wants to merge 3 commits into
mainfrom
notashelf/push-unvwonkswwyo
Open

NotAShelf wants to merge 3 commits into
mainfrom
notashelf/push-unvwonkswwyo

Conversation

@NotAShelf

Copy link
Copy Markdown
Owner

This is all @faukah's fault. I blame him for everything.

This PR finally refactors the theming module to be more configurable, namely in the sense that it can now:

  1. Use the setupOpts API that we've been pushing
  2. Configure multiple theme plugins at once

In the light of the new API, the old options have been soft-deprecated. I would like to remove them altogether but I ran into some stupid issues with the warning messages, and could not be bothered with fixing each one of them one by one. Eventually we'll want to figure it out. Eventually.

Needs documentaton, and should be merged preferably after #1160 so we don't create more 9-sided merge conflicts.

@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown

🚀 Live preview deployed from 64cbd0f

View it here:

Debug Information

Triggered by: NotAShelf

HEAD at: notashelf/push-unvwonkswwyo

Reruns: 3872

@horriblename horriblename left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just split up supported-themes.nix into their own files, and have them define their options like normal modules?

# modules/plugins/theme/onedark.nix
{lib, config, ...}: {
  options = {
    enable = lib.mkEnableOption "...";
    setupOpts = ...;
  }
  
  config.vim = {
     startPlugins = ["onedark"];
     luaConfigRC = "require'onedark'.setup(${...})";
  };
}

lazy-loading colorschemes is probably desirable since we're allowing multiple colorschemes

@faukah faukah mentioned this pull request Dec 4, 2025
3 tasks
github-actions Bot pushed a commit that referenced this pull request Jan 27, 2026
Comment thread modules/plugins/theme/theme.nix Outdated

@horriblename horriblename left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed my mind about splitting supporthed-themes.nix, I'll accept this aside from the "what" in the warnings section

(API looks good we'll just refactor later only if it starts being a problem)

Comment thread modules/plugins/theme/theme.nix Outdated

# We'd like to warn when the user is using a completely legacy configuration
warnings = let
# FIXME: what

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what

@github-actions
github-actions Bot deleted the branch main March 1, 2026 05:13
@NotAShelf
NotAShelf changed the base branch from v0.8 to main March 13, 2026 19:02
github-actions Bot pushed a commit that referenced this pull request Mar 13, 2026
@snoweuph snoweuph linked an issue Mar 24, 2026 that may be closed by this pull request
1 task
@snoweuph snoweuph mentioned this pull request Jun 22, 2026
1 task

@snoweuph snoweuph left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some Changelog info about the stuff you're doing here.

Comment thread modules/plugins/theme/supported-themes.nix
Comment thread release.json Outdated
Comment thread modules/plugins/theme/theme.nix Outdated
Comment thread modules/plugins/theme/theme.nix Outdated
Comment thread modules/plugins/theme/theme.nix Outdated
Comment thread modules/plugins/theme/theme.nix
Comment thread modules/plugins/theme/theme.nix Outdated
@snoweuph snoweuph added this to the 26.12 milestone Aug 4, 2026
@NotAShelf
NotAShelf force-pushed the notashelf/push-unvwonkswwyo branch from 8edc00c to 92aac8c Compare August 4, 2026 08:08
github-actions Bot pushed a commit that referenced this pull request Aug 4, 2026
@NotAShelf
NotAShelf force-pushed the notashelf/push-unvwonkswwyo branch from 92aac8c to 310442a Compare August 4, 2026 08:58
github-actions Bot pushed a commit that referenced this pull request Aug 4, 2026
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia2fc674a2b2fb199443b9c6985029e426a6a6964
@NotAShelf
NotAShelf force-pushed the notashelf/push-unvwonkswwyo branch from 310442a to 946ad52 Compare August 4, 2026 09:00
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib540b435f6dbbcea2cdfebfdf1c65f6b6a6a6964
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I7615b80b1ea23bfad04e44c718a666436a6a6964
...
}: ''
setup = setupOpts: let
cleanedOpts =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be some way for users to do config on here?

cleanedOpts =
(removeAttrs setupOpts ["style" "transparent"])
// {
dark_variant = setupOpts.style or "main"; # main, moon, or dawn

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that comment realy needed anymore when styles is literary defined as those 3 already.

(removeAttrs setupOpts ["transparent"])
// {
transparent = setupOpts.transparent or false;
search = "vscode"; # [vim|vscode]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it vscode and not vim? also why the comment, when there is no way to configure and its hardcoded?

thould this maybe get some way for a user to configure?

github-actions Bot pushed a commit that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

better theme configuration

7 participants