use mason for dependency management

This commit is contained in:
2026-08-09 12:18:18 -05:00
parent b993db8ee6
commit 53d06709b2
7 changed files with 75 additions and 44 deletions
+10 -6
View File
@@ -83,6 +83,14 @@ function check_binary() {
fi
}
function ensure_brew_binary() {
if ! command -v "$1" >/dev/null 2>&1; then
check_binary brew
brew install "$2"
fi
check_binary "$1"
}
export PATH="${HOME}/.local/bin:${PATH}"
for BINARY in "${NVIM_REQUIRED_BINARIES[@]}"; do
@@ -94,13 +102,9 @@ if ! command -v luafmt >/dev/null 2>&1; then
fi
check_binary luafmt
if [ "${NVIM_OS}" = "macOS" ] &&
! command -v vala-language-server >/dev/null 2>&1; then
check_binary brew
brew install vala-language-server
fi
if [ "${NVIM_OS}" = "macOS" ]; then
check_binary vala-language-server
ensure_brew_binary pwsh powershell
ensure_brew_binary vala-language-server vala-language-server
fi
pushd "${SCRIPT_DIR}" 1>/dev/null 2>&1 || error_exit "failed to push: ${SCRIPT_DIR}"