add script to install lazy.nvim

This commit is contained in:
Dan Anglin 2024-09-14 09:53:06 +01:00
parent a8398512fd
commit 7c5609dd00
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
2 changed files with 19 additions and 0 deletions

19
scripts/install_lazy.nvim Executable file
View file

@ -0,0 +1,19 @@
#!/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}"