From 68239150ee635a05e8c795099816bdf1b5db3857 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Wed, 1 Apr 2026 13:53:10 +0300 Subject: [PATCH] Add neovim install script --- run_once_install-neovim.sh.tmpl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 run_once_install-neovim.sh.tmpl diff --git a/run_once_install-neovim.sh.tmpl b/run_once_install-neovim.sh.tmpl new file mode 100755 index 0000000..74fb717 --- /dev/null +++ b/run_once_install-neovim.sh.tmpl @@ -0,0 +1,32 @@ +#!/bin/bash +set -euo pipefail + +NVIM_DIR="${HOME}/apps/neovim" +BUILD_TYPE="Debug" +BRANCH="master" + +echo "Installing neovim from source" +echo "Target folder: ${NVIM_DIR}" +echo "Branch: ${BRANCH}" +echo "Build type: ${BUILD_TYPE}" + +{{ if eq .chezmoi.osRelease.idLike "arch" }} +sudo pacman -S --noconfirm --needed base-devel cmake ninja curl git +{{ end }} + +mkdir -p "${HOME}/apps" + +if [[ -d "${NVIM_DIR}/src" ]]; then + cd "${NVIM_DIR}/src" + git fetch --all --prune + git checkout "${BRANCH}" + git pull +else + git clone https://github.com/neovim/neovim.git "${NVIM_DIR}/src" + cd "${NVIM_DIR}/src" + git checkout "${BRANCH}" +fi + +rm -r build/ +make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${NVIM_DIR}" +make install