1
0
Fork 0

Zsh: Don't load autosuggestions on slow computers

This commit is contained in:
tastytea 2022-04-04 19:29:56 +02:00
parent 0a43f420e2
commit f37ca08d78
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 6 additions and 1 deletions

View File

@ -48,6 +48,11 @@ if command -v fzf > /dev/null; then
local _depends_on_fzf="Aloxaf/fzf-tab"
fi
if [[ "$HOST" != "steuerbeamter" ]]; then
# Don't load these on slow computers
local _heavy_plugins="zsh-users/zsh-autosuggestions"
fi
if command -v antibody > /dev/null; then
local plugin_cache_dir="$(antibody home)"
export ZSH_PLUGIN_SOURCE="${plugin_cache_dir}/antibody-plugins.zsh"
@ -67,7 +72,7 @@ if command -v antibody > /dev/null; then
mkdir -p "${plugin_cache_dir}"
antibody bundle --parallelism=$(nproc --ignore=1) <<EOF > "${ZSH_PLUGIN_SOURCE}"
${_depends_on_fzf}
zsh-users/zsh-autosuggestions
${_heavy_plugins}
mafredri/zsh-async
zsh-users/zsh-syntax-highlighting
# Must come after zsh-syntax-highlighting