manager/scripts/install_lazy.nvim
Dan Anglin 59a6969c25
feat: download configs from external sources
Download and install configurations from external sources. At the moment
downloading from external git repositories is only supported.

Download and install the Neovim configuration for sparrow.

Add an external script to install lazy.nvim.
2024-09-14 11:41:58 +01:00

19 lines
553 B
Bash
Executable file

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
LAZY_NVIM_SOURCE="https://github.com/folke/lazy.nvim.git"
LAZY_NVIM_DESTINATION="${XDG_DATA_HOME}/nvim/lazy/lazy.nvim"
LAZY_STATE_DIR="${XDG_STATE_HOME}/nvim/lazy"
mkdir -p "${LAZY_STATE_DIR}"
if [ -d "${LAZY_NVIM_DESTINATION}/.git" ]; then
echo "INFO: ${LAZY_NVIM_DESTINATION} is already present"
exit 0
fi
echo "INFO: Cloning ${LAZY_NVIM_SOURCE} to ${LAZY_NVIM_DESTINATION}..."
git clone --filter=blob:none --single-branch "${LAZY_NVIM_SOURCE}" "${LAZY_NVIM_DESTINATION}"