mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29: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";
|
description = "Enable zsh autosuggestions";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableSyntaxHighlighting = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = "Enable zsh syntax highlighting";
|
||||||
|
};
|
||||||
|
|
||||||
history = mkOption {
|
history = mkOption {
|
||||||
type = historyModule;
|
type = historyModule;
|
||||||
default = {};
|
default = {};
|
||||||
|
@ -482,6 +487,10 @@ in
|
||||||
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
"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
|
# Environment variables
|
||||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||||
${envVarsStr}
|
${envVarsStr}
|
||||||
|
|
Loading…
Reference in a new issue