info "Setting up yazi"

if ! is_installed cargo; then
    info "Setting up rust"
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    . "$HOME/.cargo/env"
    rustup update
fi

info "Installing dependencies"
install "ffmpeg 7zip jq poppler-utils fd-find ripgrep fzf zoxide imagemagick"

if ! is_installed yazi; then
    info "Installing yazi from cargo"
    cargo install --locked yazi-fm yazi-cli
fi
