feat(home-manager): add support for zsh-syntax-highlighting (#146)
Co-authored-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
112cef79d9
commit
ef2f0d91ea
5 changed files with 59 additions and 0 deletions
|
@ -718,5 +718,25 @@
|
|||
"type": "github"
|
||||
},
|
||||
"version": "0adc53028d81bf047461bc61c43a484d11b15220"
|
||||
},
|
||||
"zsh-syntax-highlighting": {
|
||||
"cargoLocks": null,
|
||||
"date": "2022-10-12",
|
||||
"extract": null,
|
||||
"name": "zsh-syntax-highlighting",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "catppuccin",
|
||||
"repo": "zsh-syntax-highlighting",
|
||||
"rev": "06d519c20798f0ebe275fc3a8101841faaeee8ea",
|
||||
"sha256": "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "06d519c20798f0ebe275fc3a8101841faaeee8ea"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,4 +433,16 @@
|
|||
};
|
||||
date = "2024-04-04";
|
||||
};
|
||||
zsh-syntax-highlighting = {
|
||||
pname = "zsh-syntax-highlighting";
|
||||
version = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
|
||||
src = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=";
|
||||
};
|
||||
date = "2022-10-12";
|
||||
};
|
||||
}
|
||||
|
|
20
modules/home-manager/zsh-syntax-highlighting.nix
Normal file
20
modules/home-manager/zsh-syntax-highlighting.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config
|
||||
, lib
|
||||
, sources
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) ctp;
|
||||
cfg = config.programs.zsh.syntaxHighlighting.catppuccin;
|
||||
enable = cfg.enable && config.programs.zsh.syntaxHighlighting.enable;
|
||||
in
|
||||
{
|
||||
options.programs.zsh.syntaxHighlighting.catppuccin =
|
||||
ctp.mkCatppuccinOpt "zsh syntax highlighting";
|
||||
|
||||
config.programs.zsh = lib.mkIf enable {
|
||||
initExtra = lib.mkBefore ''
|
||||
source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavour}-zsh-syntax-highlighting.zsh'
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -141,3 +141,7 @@ fetch.github = "catppuccin/yazi"
|
|||
[zathura]
|
||||
src.git = "https://github.com/catppuccin/zathura.git"
|
||||
fetch.github = "catppuccin/zathura"
|
||||
|
||||
[zsh-syntax-highlighting]
|
||||
src.git = "https://github.com/catppuccin/zsh-syntax-highlighting.git"
|
||||
fetch.github = "catppuccin/zsh-syntax-highlighting"
|
||||
|
|
3
test.nix
3
test.nix
|
@ -88,6 +88,9 @@ testers.runNixOSTest {
|
|||
yazi = enable;
|
||||
zathura = enable;
|
||||
zellij = enable;
|
||||
zsh = enable // {
|
||||
syntaxHighlighting = enable;
|
||||
};
|
||||
};
|
||||
|
||||
gtk = lib.recursiveUpdate enable { catppuccin.cursor.enable = true; };
|
||||
|
|
Loading…
Reference in a new issue