Skip to content

Commit

Permalink
feat(home-manager): add support for zed-editor (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses authored Dec 20, 2024
1 parent 5501cb5 commit dede06d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
./waybar.nix
./yazi.nix
./zathura.nix
./zed-editor.nix
./zellij.nix
./zsh-syntax-highlighting.nix
]
25 changes: 25 additions & 0 deletions modules/home-manager/zed-editor.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ catppuccinLib }:
{ config, lib, ... }:

let
cfg = config.catppuccin.zed;
in

{
options.catppuccin.zed = catppuccinLib.mkCatppuccinOption { name = "zed"; } // {
italics = lib.mkEnableOption "the italicized version of theme" // {
default = true;
};
};

config = lib.mkIf cfg.enable {
programs.zed-editor = {
extensions = [ "catppuccin" ];

userSettings.theme = {
light = "Catppuccin " + cfg.flavor + lib.optionalString cfg.italics " - No Italic";
dark = "Catppuccin" + cfg.flavor + lib.optionalString cfg.italics " - No Italic";
};
};
};
}
1 change: 1 addition & 0 deletions tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
waybar.enable = true;
yazi.enable = true;
zathura.enable = true;
zed-editor.enable = true;
zellij.enable = true;
zsh = {
enable = true;
Expand Down

0 comments on commit dede06d

Please sign in to comment.