From 35ae47e44bc3c05a1e8db4df857c7e43da535312 Mon Sep 17 00:00:00 2001 From: Silva Alejandro Ismael Date: Wed, 23 Oct 2019 11:54:52 -0300 Subject: [PATCH] nixos/zsh-syntax-highlighting: Fix highlighting when ohMyZsh is enabled From https://github.com/zsh-users/zsh-syntax-highlighting#faq: "It must be sourced after all custom widgets have been created (i.e., after all zle -N calls and after running compinit)." zsh-syntax-highlighting must be sourced to the end. --- nixos/modules/programs/zsh/zsh-syntax-highlighting.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index 7184e5d9b9a8..c84d26a7921e 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -81,7 +81,7 @@ in ]; programs.zsh.interactiveShellInit = with pkgs; - lib.concatStringsSep "\n" ([ + lib.mkAfter (lib.concatStringsSep "\n" ([ "source ${zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ] ++ optional (length(cfg.highlighters) > 0) "ZSH_HIGHLIGHT_HIGHLIGHTERS=(${concatStringsSep " " cfg.highlighters})" @@ -95,6 +95,6 @@ in styles: design: "ZSH_HIGHLIGHT_STYLES[${styles}]='${design}'" ) cfg.styles) - ); + )); }; }