From 5d0d5f7fb1d24a05450dc6148409e46f339d9b19 Mon Sep 17 00:00:00 2001 From: Michael Thomas Date: Sun, 28 Apr 2024 16:45:32 -0400 Subject: [PATCH] feat(zsh): remove prezto for faster start times --- machines/mac/configuration.nix | 1 + user/modules/zsh.nix | 48 +++++++++++++++------------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/machines/mac/configuration.nix b/machines/mac/configuration.nix index b709d89..71faf22 100644 --- a/machines/mac/configuration.nix +++ b/machines/mac/configuration.nix @@ -46,6 +46,7 @@ eval `/usr/libexec/path_helper -s` fi ''; + enableGlobalCompInit = false; }; }; diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix index 4073c7f..ce22015 100644 --- a/user/modules/zsh.nix +++ b/user/modules/zsh.nix @@ -5,6 +5,27 @@ }: { programs.zsh = { enable = true; + + enableAutosuggestions = true; + # autosuggestion.enable = true; + syntaxHighlighting.enable = true; + historySubstringSearch.enable = true; + autocd = true; + enableCompletion = true; + + # Enable pure prompt + initExtra = '' + fpath+=${pkgs.pure-prompt}/share/zsh/site-functions + autoload -U promptinit; + promptinit + prompt pure + ''; + + sessionVariables = { + # Make ls colorful on MacOS + CLICOLOR = 1; + }; + plugins = [ { name = "zsh-nix-shell"; @@ -16,33 +37,6 @@ sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; }; } - { - name = "powerlevel10k-config"; - src = lib.cleanSource ./p10k-config; - file = "p10k.zsh"; - } ]; - prezto = { - enable = true; - pmodules = [ - "archive" - "docker" - "environment" - "git" - "terminal" - "editor" - "history" - "directory" - "spectrum" - "utility" - "completion" - "command-not-found" - "syntax-highlighting" - "history-substring-search" - "autosuggestions" - "prompt" - ]; - prompt.theme = "powerlevel10k"; - }; }; }