From c0d94cdc444c06356c1b64d5a7073ff41dffab81 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Mon, 29 Dec 2025 00:19:53 -0500 Subject: Tweaks to nvim config. Add notes on compiling for OpenBSD --- compile/nvim.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'compile') diff --git a/compile/nvim.sh b/compile/nvim.sh index de0c4f8..ac669ac 100755 --- a/compile/nvim.sh +++ b/compile/nvim.sh @@ -5,16 +5,31 @@ if [ "$(id -u)" -eq 0 ] ; then fi set -ex nproc=1 -if [ $(uname) = "Darwin" ] ; then - nproc="$(sysctl -n hw.ncpu)" -elif [ $(uname) = "Linux" ] ; then - nproc="$(nproc)" -fi +case "$(uname)" in +Darwin|OpenBSD) nproc="$(sysctl -n hw.ncpu)" ;; +Linux) nproc="$(nproc)" ;; +esac codedir="${CODEDIR:-$HOME/scm}" nvimdir="${codedir}/nvim" + +# On OpenBSD: +# Workaround for OpenBSD's make being called endlessly... +# #!/bin/sh +# exec gmake "$@" +# Call it `make` and place it in your path before the system make. +# Then: +# pkg_add gmake cmake cargo rust clang-tools-extra +# Also in the environment: +# LIBCLANG_PATH=/usr/local/llvm21/lib +# CARGO_TARGET_DIR=$HOME/.cache/cargo-target-dir # /tmp is usually small... +# Then cargo for tree-sitter-cli... +# cargo install tree-sitter-cli +# Also add ~/.cargo/bin to your path when you're done. + if ! [ -d "$nvimdir" ] ; then git clone https://github.com/neovim/neovim "$nvimdir" fi + cd "$nvimdir" git clean -fdx . rm -rf build || echo "" -- cgit v1.2.3