antidote: add module

Antidote is a Zsh plugin manager.
This commit is contained in:
hitsmaxft 2023-06-15 20:52:33 +08:00 committed by Robert Helgesson
parent b9046172a5
commit 70ac18872a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
6 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,31 @@
{ ... }:
let relToDotDirCustom = ".zshplugins";
in {
programs.zsh = {
enable = true;
dotDir = relToDotDirCustom;
antidote = {
enable = true;
useFriendlyNames = true;
plugins = [ "zsh-users/zsh-autosuggestions" ];
};
};
test.stubs = {
antidote = { };
zsh = { };
};
nmt.script = ''
assertFileContains home-files/${relToDotDirCustom}/.zshrc \
'source @antidote@/antidote.zsh'
assertFileContains home-files/${relToDotDirCustom}/.zshrc \
'antidote load'
assertFileContains home-files/${relToDotDirCustom}/.zshrc \
"zstyle ':antidote:bundle' use-friendly-names 'yes'"
assertFileContains home-files/${relToDotDirCustom}/.zsh_plugins.txt \
'zsh-users/zsh-autosuggestions'
'';
}

View file

@ -0,0 +1 @@
{ antidote-program = ./antidote.nix; }