diff options
Diffstat (limited to '.config/zsh')
| -rw-r--r-- | .config/zsh/.zsh_plugins.txt | 11 | ||||
| -rw-r--r-- | .config/zsh/.zshenv | 7 | ||||
| -rw-r--r-- | .config/zsh/.zshrc | 46 |
3 files changed, 37 insertions, 27 deletions
diff --git a/.config/zsh/.zsh_plugins.txt b/.config/zsh/.zsh_plugins.txt index 2c765d6..6d44543 100644 --- a/.config/zsh/.zsh_plugins.txt +++ b/.config/zsh/.zsh_plugins.txt @@ -1,5 +1,6 @@ -zsh-users/zsh-completions kind:fpath path:src -zsh-users/zsh-syntax-highlighting -# ohmyzsh/ohmyzsh path:lib/git.zsh -# halfo/lambda-mod-zsh-theme kind:zsh -romkatv/powerlevel10k +# ohmyzsh/ohmyzsh path:lib/git.zsh kind:defer +# halfo/lambda-mod-zsh-theme path:lambda-mod.zsh-theme +romkatv/powerlevel10k path:powerlevel10k.zsh-theme + +zsh-users/zsh-completions kind:fpath path:src +zsh-users/zsh-syntax-highlighting path:zsh-syntax-highlighting.plugin.zsh diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 0bab150..fefc8c3 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -2,13 +2,12 @@ # getchoo's zshenv # +source "${HOME}/.config/shell/profile" # add user's bin directory to path typeset -U path PATH -if [[ -d "$HOME/.local/bin" ]]; then - path=("$HOME/.local/bin" "$path[@]") +if [[ -d "${HOME}/.local/bin" ]]; then + path=("${HOME}/.local/bin" "$path[@]") export PATH fi - -source "$HOME/.config/shell/profile" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index fb7a675..3857da9 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -2,18 +2,20 @@ # getchoo's zshrc # -# bootstrap antidote -antidote_dir="$ZDOTDIR/.antidote" -plugins_file="$ZDOTDIR/.zsh_plugins.txt" -static_file="$ZDOTDIR/.zsh_plugins.zsh" +local zdump="${XDG_CACHE_HOME}/zsh/zcompdump" +local antidote_dir="${ZDOTDIR}/.antidote" +local plugins_file="${ZDOTDIR}/.zsh_plugins.txt" +local static_file="${ZDOTDIR}/.zsh_plugins.zsh" zstyle ':antidote:bundle' use-friendly-names 'yes' # don't use ugly dirs +# recompile static file when needed if [[ ! "$static_file" -nt "$plugins_file" ]] then - [[ ! -e "$antidote_dir" ]] && \ + # bootstrap antidote + [[ ! -e "$antidote_dir/antidote.zsh" ]] && \ git clone --depth=1 https://github.com/mattmc3/antidote.git "$antidote_dir" - source "$antidote_dir/antidote.zsh" + source "${antidote_dir}/antidote.zsh" [[ ! -e "$plugins_file" ]] && touch "$plugins_file" antidote bundle < "$plugins_file" > "$static_file" fi @@ -23,26 +25,34 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] fi # zmodules -autoload -U compinit colors "$antidote_dir/antidote.zsh" +autoload -Uz compinit colors "${antidote_dir}/antidote.zsh" colors +zmodload zsh/zutil zmodload zsh/complist -zstyle ':completion:*' menu select reshash true -zstyle ':completion::complete:*' use-cache on - -# load plugins -source "$static_file" -unset antidote_dir +zstyle ':completion::*' completer _extensions _complete _approximate +zstyle ':completion::*' group-name '' +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-dirs-first true +zstyle ':completion:*' menu select +zstyle ':completion::*' use-cache on +zstyle ':completion::*' cache-path "$zdump" # compile completion -zdump="$ZDOTDIR/.zcompdump" compinit -d "$zdump" -if [[ ! "$zdump.zwc" -nt "$zdump" ]] +if [[ ! "${zdump}.zwc" -nt "$zdump" ]] then zcompile "$zdump" fi +# load plugins +source "$static_file" + # options -setopt append_history +unsetopt hist_beep +unsetopt list_beep +setopt hist_expire_dups_first +setopt hist_ignore_dups +setopt hist_ignore_space setopt inc_append_history setopt prompt_subst setopt share_history @@ -64,12 +74,12 @@ zle -N clear-screen-and-scrollback bindkey '^L' clear-screen-and-scrollback # enable history -HISTFILE="$XDG_STATE_HOME/zsh/history" +HISTFILE="${XDG_STATE_HOME}/zsh/history" HISTSIZE=100 SAVEHIST=1000 # source aliases -source "$XDG_CONFIG_HOME/shell/aliases" +source "${XDG_CONFIG_HOME}/shell/aliases" # To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh |
