diff --git a/install-nvim-latest.sh b/install-nvim-latest.sh new file mode 100755 index 0000000..c2fea2d --- /dev/null +++ b/install-nvim-latest.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euo pipefail + +archive="nvim-linux-x86_64.tar.gz" + +cleanup() { + rm -f "$archive" +} + +trap cleanup EXIT + +curl -Lo "$archive" https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz +sudo rm -rf /opt/nvim-linux-x86_64 +sudo tar -C /opt -xzf "$archive" + +cat <<'EOF' +Add this to your shell config (~/.bashrc, ~/.zshrc, ...): + +export PATH="$PATH:/opt/nvim-linux-x86_64/bin" +EOF