DEV Community

Cover image for Antidote: Memaksimalkan Efisiensi Plugin ZSH dalam Sekali Pasang
pelurunyasar
pelurunyasar

Posted on

Antidote: Memaksimalkan Efisiensi Plugin ZSH dalam Sekali Pasang

Antidote adalah alat manajemen plugin inovatif untuk Zsh (Z shell). Dirancang untuk memudahkan pemasangan, pengelolaan, dan migrasi plugin Zsh. Memberikan solusi praktis bagi pengguna untuk meningkatkan produktivitas dan kenyamanan menggunakan Zsh. Antidote menghilangkan kerumitan proses manual dan memungkinkan migrasi lancar dari Antigen ke Zsh.

Kebutuhan:

  1. git
  2. oh-my-zsh

Clone antidote dari repo yang sudah disediakan.

git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
Enter fullscreen mode Exit fullscreen mode

kemudian isi ke dalam file ~/.zshrc menggunakan editor
nano ~/.zshrc
vi ~/.zshrc

saya memilih Ultra high performance install dari antidote

# ~/.zshrc

# Set the name of the static .zsh plugins file antidote will generate.
zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.zsh

# Ensure you have a .zsh_plugins.txt file where you can add plugins.
[[ -f ${zsh_plugins:r}.txt ]] || touch ${zsh_plugins:r}.txt

# Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote)
autoload -Uz $fpath[-1]/antidote

# Generate static file in a subshell when .zsh_plugins.txt is updated.
if [[ ! $zsh_plugins -nt ${zsh_plugins:r}.txt ]]; then
  (antidote bundle <${zsh_plugins:r}.txt >|$zsh_plugins)
fi

# Source your static plugins file.
source $zsh_plugins
Enter fullscreen mode Exit fullscreen mode

setelah memperbarui file .zshrc jangan langsung di source buat file ~/.zsh_plugins.txt menggunakan touch ~/.zsh_plugins.txt

kemudian isi plugin yang dibutuhkan, jangan semuanya dipakai, tetapi yang dibutuhkan saja, karena akan sia sia dan memperlambat dari kinerja zsh sendiri

romkatv/powerlevel10k
romkatv/zsh-bench kind:path
olets/zsh-abbr    kind:defer

ohmyzsh/ohmyzsh path:lib
ohmyzsh/ohmyzsh path:plugins/colored-man-pages
ohmyzsh/ohmyzsh path:plugins/magic-enter
ohmyzsh/ohmyzsh path:plugins/copypath

rupa/z
sunlei/zsh-ssh
zsh-users/zsh-completions
zsh-users/zsh-history-substring-search
zsh-users/zsh-autosuggestions

mattmc3/zfunctions
zdharma-continuum/fast-syntax-highlighting kind:defer
Enter fullscreen mode Exit fullscreen mode

pastikan nama saat membuat zsh_plugins.txt benar jika tidak maka file tidak akan ditemukan oleh antidote.

jalan perintah

source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

maka antidote akan mencari repo yang sudah di masukkan ke dalam file zsh_plugins.txt dan memperbarui ketika ada pembaruan mengunakan omz update

sumber terkait
oh-my-zsh
zsh
antidote
powerline10k

Top comments (0)