From f957be17d0c304a882041cf9d0352ded5d131681 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Tue, 29 Apr 2025 20:28:32 +1000 Subject: [PATCH] user/zsh: switch to new initcontent --- modules/user/zsh.nix | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/modules/user/zsh.nix b/modules/user/zsh.nix index 9f4b920..54533b9 100644 --- a/modules/user/zsh.nix +++ b/modules/user/zsh.nix @@ -117,14 +117,6 @@ in { }; enableCompletion = true; - initExtraBeforeCompInit = '' - fpath+=(/run/current-system/sw/share/zsh/site-functions) - zstyle ':completion:*' completer _complete - zstyle ':completion:*' matcher-list "" 'm:{[:lower:][:upper:]-_}={[:upper:][:lower:]_-}' '+l:|=* r:|=*' - zstyle ':completion:*' menu select - _comp_options+=(globdots) - zmodload zsh/complist - ''; localVariables = { KEYTIMEOUT = "1"; @@ -138,16 +130,26 @@ in { ls = "ls --color=auto --group-directories-first -v"; diff = "diff -Naur --color=auto"; }; - initExtraFirst = '' - autoload -U colors && colors - ''; - initExtra = lib.concatStringsSep "\n" [ - pure - cursorShape - direnv - genAbbrs - viExtraNav - disableExecute + initContent = lib.mkMerge [ + (lib.mkBefore '' + autoload -U colors && colors + '') + (lib.mkOrder 550 '' + fpath+=(/run/current-system/sw/share/zsh/site-functions) + zstyle ':completion:*' completer _complete + zstyle ':completion:*' matcher-list "" 'm:{[:lower:][:upper:]-_}={[:upper:][:lower:]_-}' '+l:|=* r:|=*' + zstyle ':completion:*' menu select + _comp_options+=(globdots) + zmodload zsh/complist + '') + (lib.concatStringsSep "\n" [ + pure + cursorShape + direnv + genAbbrs + viExtraNav + disableExecute + ]) ]; plugins = builtins.map (e: pluginFromInput e) [