zsh-syntax-highlighting: init at 0.4.1

fixes #19179
This commit is contained in:
Ignat Loskutov
2016-10-03 17:49:04 +02:00
committed by Jörg Thalheim
parent 5e882ea558
commit 9f34b5595e
3 changed files with 47 additions and 1 deletions
+14 -1
View File
@@ -84,6 +84,14 @@ in
type = types.bool;
};
enableSyntaxHighlighting = mkOption {
default = false;
description = ''
Enable zsh-syntax-highlighting
'';
type = types.bool;
};
};
};
@@ -120,6 +128,10 @@ in
${if cfg.enableCompletion then "autoload -U compinit && compinit" else ""}
${optionalString (cfg.enableSyntaxHighlighting)
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
}
HELPDIR="${pkgs.zsh}/share/zsh/$ZSH_VERSION/help"
'';
@@ -182,7 +194,8 @@ in
environment.etc."zinputrc".source = ./zinputrc;
environment.systemPackages = [ pkgs.zsh ]
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;
++ optional cfg.enableCompletion pkgs.nix-zsh-completions
++ optional cfg.enableSyntaxHighlighting pkgs.zsh-syntax-highlighting;
environment.pathsToLink = optional cfg.enableCompletion "/share/zsh";