2 Revize 29ba794bec ... cc3e0a258b

Autor SHA1 Zpráva Datum
  Kevin Heinicke cc3e0a258b Further speedup zsh init před 2 týdny
  Kevin Heinicke 2369d0d0e3 Fix completion init process před 2 týdny
2 změnil soubory, kde provedl 10 přidání a 9 odebrání
  1. 1 1
      sheldon-plugins.toml
  2. 9 8
      zshrc

+ 1 - 1
sheldon-plugins.toml

@@ -21,7 +21,7 @@ apply = ["source"]
 # defer = { value = 'zsh-defer source "{{ file }}"', each = true }
 
 [plugins.compinit]
-inline = 'autoload -Uz compinit && zsh-defer compinit && compinit'
+inline = 'autoload -Uz compinit; if [[ -n ~/.zcompdump(#qN.mh+24) ]]; then compinit; else compinit -C; fi'
 
 [plugins.p10k]
 github = "romkatv/powerlevel10k"

+ 9 - 8
zshrc

@@ -63,18 +63,24 @@ eval "$(direnv hook zsh)"
 [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
 
 # load homebrew autocompletions
-if which brew > /dev/null; then
-  fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
+if [[ -d /opt/homebrew/share/zsh/site-functions ]]; then
+  fpath=(/opt/homebrew/share/zsh/site-functions $fpath)
 fi
 
+zmodload zsh/complist
+
 # zplug load
 if which sheldon > /dev/null; then
   eval "$(sheldon source)"
 fi
 
-zmodload zsh/complist
 zstyle ':completion:*' menu select
 
+[[ ! -f ~/.zsh_local_completions ]] || source ~/.zsh_local_completions
+
+# Better cp -- must go after compinit and stuff
+eval "$(zoxide init zsh)"
+
 # vi mode
 bindkey -v
 export KEYTIMEOUT=1
@@ -86,11 +92,6 @@ bindkey -M menuselect 'l' vi-forward-char
 bindkey -M menuselect 'j' vi-down-line-or-history
 bindkey -v '^?' backward-delete-char
 
-[[ ! -f ~/.zsh_local_completions ]] || source ~/.zsh_local_completions
-
-# Better cp -- must go after compinit and stuff
-eval "$(zoxide init zsh)"
-
 # Store if light or dark mode is active
 if [[ $(defaults read -g AppleInterfaceStyle 2&> /dev/null) == "Dark" ]]
 then