Skip to content

Commit

Permalink
zsh: add enableSyntaxHighlighting option
Browse files Browse the repository at this point in the history
Add a simple way to enable syntax highlighting for zsh using https://github.com/zsh-users/zsh-syntax-highlighting
  • Loading branch information
davegallant committed Jun 28, 2021
1 parent 8d3b273 commit 6fb5502
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/programs/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ in
description = "Enable zsh autosuggestions";
};

enableSyntaxHighlighting = mkOption {
default = false;
description = "Enable zsh syntax highlighting";
};

history = mkOption {
type = historyModule;
default = {};
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 6fb5502

Please sign in to comment.