aboutsummaryrefslogtreecommitdiff
path: root/compile/nvim.sh
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2025-12-29 00:19:53 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2025-12-29 00:19:53 -0500
commitc0d94cdc444c06356c1b64d5a7073ff41dffab81 (patch)
treef0713f79fd9943937d78b68fcd2d37246460950a /compile/nvim.sh
parent0b19dbf19ac79657aa74c68b7f0e32b2525184ae (diff)
downloaddotfiles-c0d94cdc444c06356c1b64d5a7073ff41dffab81.tar.gz
dotfiles-c0d94cdc444c06356c1b64d5a7073ff41dffab81.tar.xz
Tweaks to nvim config. Add notes on compiling for OpenBSD
Diffstat (limited to 'compile/nvim.sh')
-rwxr-xr-xcompile/nvim.sh25
1 files changed, 20 insertions, 5 deletions
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 ""