From 6034a9797c92b873eddd0d818fc780410052d98c Mon Sep 17 00:00:00 2001 From: lsoriano-mcm Date: Sat, 7 Jun 2025 13:49:32 -0500 Subject: [PATCH] optimize: replaced omz to antidote --- info.default.nix | 1 + pkgs/zsh/default.nix | 46 ++++++++++++++------------------------------ 2 files changed, 15 insertions(+), 32 deletions(-) diff --git a/info.default.nix b/info.default.nix index 3874e84..d9a915a 100644 --- a/info.default.nix +++ b/info.default.nix @@ -12,6 +12,7 @@ termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font termShell = "fish"; shellAliases = { + ls = "ls --color=auto"; update = '' if [[ $(uname) == "Darwin" ]]; then sudo darwin-rebuild switch --flake ~/.config/nixos#macos diff --git a/pkgs/zsh/default.nix b/pkgs/zsh/default.nix index 2cbf523..d292b2c 100644 --- a/pkgs/zsh/default.nix +++ b/pkgs/zsh/default.nix @@ -10,48 +10,30 @@ programs.zsh.enable = true; programs.zoxide.enable = true; - programs.oh-my-posh.enable = false; - - home.file.".config/oh-my-posh/config.omp.json" = { - source = ./custom/config.omp.json; - force = true; - }; programs.zsh = { plugins = [ - { - name = "vi-mode"; - src = pkgs.zsh-vi-mode; - file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh"; - } - { - name = "autosuggestion"; - src = pkgs.zsh-autosuggestions; - file = "share/zsh-autosuggestions/zsh-autosuggestions.zsh"; - } ]; - enableCompletion = true; - syntaxHighlighting.enable = true; + + enableCompletion = false; + syntaxHighlighting.enable = false; + shellAliases = terminal.shellAliases; + history.size = 10000; - oh-my-zsh = { - plugins = []; + + antidote = { enable = true; - theme = "robbyrussell"; - extraConfig = '' - zstyle ':completion:*' completer _expand _complete _ignored _approximate _expand_alias - zstyle ':autocomplete:*' default-context curcontext - zstyle ':autocomplete:*' min-input 0 - - setopt HIST_FIND_NO_DUPS - - # setopt autocd # cd without writing 'cd' - setopt globdots # show dotfiles in autocomplete list - ''; + plugins = [ + "jeffreytse/zsh-vi-mode" + "zdharma-continuum/fast-syntax-highlighting kind:defer" + "zsh-users/zsh-autosuggestions kind:defer" + "zsh-users/zsh-history-substring-search kind:defer" + ]; }; initContent = '' # zsh-autocomplete - bindkey -M menuselect '^M' .accept-line # run code when selected completion + # bindkey -M menuselect '^M' .accept-line # run code when selected completion autoload -Uz compinit if [ "$(date +'%j')" != "$(stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)" ]; then