summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Opiyo <driest.gravels_0j@icloud.com>2024-03-20 20:12:46 -0500
committerTrevor Opiyo <trevoropiyo@trevoropiyo.com>2024-05-29 12:24:11 -0500
commit2839ef54aaaa0ca797659a1db45876260b93b1eb (patch)
tree32c8aba65b938e0ac42a76a9a845a131d9189fca
parentc0d5b8c54d6828516c97f6be9f2d00c63a363df4 (diff)
Add support for zsh-fast-syntax-highlighting
-rw-r--r--modules/programs/zsh/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/programs/zsh/default.nix b/modules/programs/zsh/default.nix
index bbf8ad9..c7ff47c 100644
--- a/modules/programs/zsh/default.nix
+++ b/modules/programs/zsh/default.nix
@@ -107,6 +107,12 @@ in
default = false;
description = "Enable zsh-syntax-highlighting.";
};
+
+ programs.zsh.enableFastSyntaxHighlighting = mkOption {
+ type = types.bool;
+ default = false;
+ description = lib.mdDoc "Enable zsh-fast-syntax-highlighting.";
+ };
};
config = mkIf cfg.enable {
@@ -115,7 +121,8 @@ in
[ # Include zsh package
pkgs.zsh
] ++ optional cfg.enableCompletion pkgs.nix-zsh-completions
- ++ optional cfg.enableSyntaxHighlighting pkgs.zsh-syntax-highlighting;
+ ++ optional cfg.enableSyntaxHighlighting pkgs.zsh-syntax-highlighting
+ ++ optional cfg.enableFastSyntaxHighlighting pkgs.zsh-fast-syntax-highlighting;
environment.pathsToLink = [ "/share/zsh" ];
@@ -196,6 +203,10 @@ in
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
}
+ ${optionalString cfg.enableFastSyntaxHighlighting
+ "source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh"
+ }
+
${optionalString cfg.enableFzfCompletion "source ${fzfCompletion}"}
${optionalString cfg.enableFzfGit "source ${fzfGit}"}
${optionalString cfg.enableFzfHistory "source ${fzfHistory}"}