mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
zsh: add enableSyntaxHighlighting
option (#2144)
Add a simple way to enable syntax highlighting for zsh using https://github.com/zsh-users/zsh-syntax-highlighting
This commit is contained in:
parent
2aeaf65e8f
commit
a17bc3217f
1 changed files with 9 additions and 0 deletions
|
@ -290,6 +290,11 @@ in
|
|||
description = "Enable zsh autosuggestions";
|
||||
};
|
||||
|
||||
enableSyntaxHighlighting = mkOption {
|
||||
default = false;
|
||||
description = "Enable zsh syntax highlighting";
|
||||
};
|
||||
|
||||
history = mkOption {
|
||||
type = historyModule;
|
||||
default = {};
|
||||
|
@ -482,6 +487,10 @@ in
|
|||
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
}
|
||||
|
||||
${optionalString cfg.enableSyntaxHighlighting
|
||||
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
}
|
||||
|
||||
# Environment variables
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
${envVarsStr}
|
||||
|
|
Loading…
Reference in a new issue