2024-05-21 14:53:46 -07:00
|
|
|
{ config, lib, ... }:
|
2024-05-01 16:53:50 -07:00
|
|
|
let
|
2024-05-13 13:33:16 -07:00
|
|
|
inherit (config.catppuccin) sources;
|
2024-05-01 16:53:50 -07:00
|
|
|
inherit (lib) ctp;
|
|
|
|
cfg = config.programs.zsh.syntaxHighlighting.catppuccin;
|
|
|
|
enable = cfg.enable && config.programs.zsh.syntaxHighlighting.enable;
|
|
|
|
in
|
|
|
|
{
|
2024-06-28 09:29:30 -07:00
|
|
|
options.programs.zsh.syntaxHighlighting.catppuccin = ctp.mkCatppuccinOpt {
|
|
|
|
name = "Zsh Syntax Highlighting";
|
|
|
|
};
|
2024-05-01 16:53:50 -07:00
|
|
|
|
|
|
|
config.programs.zsh = lib.mkIf enable {
|
|
|
|
initExtra = lib.mkBefore ''
|
2024-05-21 17:23:55 -07:00
|
|
|
source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavor}-zsh-syntax-highlighting.zsh'
|
2024-05-01 16:53:50 -07:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|