Skip to content

Commit

Permalink
fix(home-manager/zed): correctly enable & select accent
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Jan 4, 2025
1 parent 07f97a4 commit 9564092
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.accept == "muave" 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 9564092

Please sign in to comment.