diff --git a/install.zsh b/install.zsh index db1303a..ad3bd96 100755 --- a/install.zsh +++ b/install.zsh @@ -10,6 +10,9 @@ case `uname` in echo "Installing dependencies from Homebrew" brew install -q $(< ./dependencies/homebrew.txt) + + echo "Installing Neovim nightly" + ./scripts/upstall_neovim_macos.zsh ;; Linux) mkdir -p ~/.local/share diff --git a/scripts/upstall_neovim_macos.zsh b/scripts/upstall_neovim_macos.zsh new file mode 100644 index 0000000..124adc7 --- /dev/null +++ b/scripts/upstall_neovim_macos.zsh @@ -0,0 +1,33 @@ +#!/bin/zsh + +# Determine OS and CPU architecture +OS=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m) + +if [[ "$OS" == "darwin" ]]; then + # macOS installation + nightly_url="https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-${ARCH}.tar.gz" + install_dir="~/opt" + + mkdir -p "${install_dir/#\~/$HOME}" + + echo "Downloading Neovim nightly for macOS ${ARCH}..." + curl -L "$nightly_url" | tar -xz -C "${install_dir/#\~/$HOME}" + echo "Neovim nightly installed to ${install_dir}/nvim-macos-${ARCH}" + +elif [[ "$OS" == "linux" ]]; then + # Linux installation + nightly_url="https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage" + install_dir="~/.local/bin" + + mkdir -p "${install_dir/#\~/$HOME}" + + echo "Downloading Neovim nightly AppImage..." + curl -L "$nightly_url" -o "${install_dir/#\~/$HOME}/nvim" + chmod +x "${install_dir/#\~/$HOME}/nvim" + echo "Neovim nightly installed to ${install_dir}/nvim" + +else + echo "Unsupported OS: $OS" + exit 1 +fi diff --git a/zsh/dot-zshrc b/zsh/dot-zshrc index 85b8b97..e52d0b2 100644 --- a/zsh/dot-zshrc +++ b/zsh/dot-zshrc @@ -71,9 +71,13 @@ done source $HOME/.scripts/geometry/geometry.zsh case `uname` in + Darwin) + # Neovim nightly + export PATH="$HOME/opt/nvim-macos-$(uname -m)/bin:$PATH" + ;; Linux) export PATH=/home/myockey/.local/bin:$PATH - ;; + ;; esac . "$HOME/.atuin/bin/env"