home: zsh: add 'zsh-completion-sync'
All checks were successful
ci/woodpecker/push/check Pipeline was successful

It's gated behind `completionSync.enable`, as it does make
entering/leaving direnv-enabled projects slower (due to the calls to
`compinit`).

This might need a bit more work to avoid multiple `compinit`s at shell
startup, will refine in the future if necessary.
This commit is contained in:
Bruno BELANYI 2025-10-27 12:31:12 +00:00
parent a20c8f820d
commit c536ee0136

View file

@ -8,6 +8,10 @@ in
launchTmux = mkEnableOption "auto launch tmux at shell start";
completionSync = {
enable = mkEnableOption "zsh-completion-sync plugin";
};
notify = {
enable = mkEnableOption "zsh-done notification";
@ -118,6 +122,18 @@ in
};
}
(lib.mkIf cfg.completionSync.enable {
programs.zsh = {
plugins = [
{
name = "zsh-completion-sync";
file = "share/zsh-completion-sync/zsh-completion-sync.plugin.zsh";
src = pkgs.zsh-completion-sync;
}
];
};
})
(lib.mkIf cfg.notify.enable {
programs.zsh = {
plugins = [