Skip to content

Commit

Permalink
fix(home-manager/zed): correctly enable & select accent (#448)
Browse files Browse the repository at this point in the history
* fix(home-manager/zed): correctly enable & select accent

* fix(home-manager/zed): mauve typo

Co-authored-by: seth <[email protected]>

---------

Co-authored-by: seth <[email protected]>
  • Loading branch information
isabelroses and getchoo authored Jan 5, 2025
1 parent c2818cb commit f05d79d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions modules/home-manager/zed-editor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ let
inherit (config.catppuccin) sources;

cfg = config.catppuccin.zed;
enable = cfg.enable && config.programs.zed-editor.enable;

accent = if cfg.accent == "mauve" then "" else " (${cfg.accent})";
in

{
Expand All @@ -19,22 +22,18 @@ in
};
};

config = lib.mkIf cfg.enable {
config = lib.mkIf enable {
programs.zed-editor = {
userSettings.theme = {
light =
"Catppuccin "
+ catppuccinLib.mkUpper cfg.flavor
+ " ("
+ cfg.accent
+ ")"
+ accent
+ lib.optionalString (!cfg.italics) " - No Italics";
dark =
"Catppuccin "
+ catppuccinLib.mkUpper cfg.flavor
+ " ("
+ cfg.accent
+ ")"
+ accent
+ lib.optionalString (!cfg.italics) " - No Italics";
};
};
Expand Down

0 comments on commit f05d79d

Please sign in to comment.