Created
May 21, 2026 19:54
-
-
Save tororutsu/798953b37fb264c4a4783faef73aac50 to your computer and use it in GitHub Desktop.
Neovim Nightly Tar Installer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env elvish | |
| # Define the URL for the pre-compiled Linux 64-bit nightly release | |
| var url = "https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.tar.gz" | |
| # Define the paths we will use | |
| var tmp_tarball = "/tmp/nvim-linux64.tar.gz" | |
| var install_dir = $E:HOME"/.local/nvim-nightly" | |
| var bin_dir = $E:HOME"/.local/bin" | |
| # 1. Download the tarball | |
| echo "Downloading Neovim nightly..." | |
| # curl flags: -L (follow redirects), --fail (exit on error), -o (output file) | |
| curl -L --fail --progress-bar -o $tmp_tarball $url | |
| # 2. Prepare the installation directory | |
| echo "Cleaning up previous installation (if any)..." | |
| # Using rm -rf and mkdir -p avoids needing complex "if exists" logic | |
| rm -rf $install_dir | |
| mkdir -p $install_dir | |
| # 3. Extract the contents | |
| echo "Extracting tarball to "$install_dir"..." | |
| # --strip-components=1 removes the top-level 'nvim-linux64' folder inside the archive | |
| # so the bin, lib, and share folders sit directly inside our install_dir | |
| tar -xzf $tmp_tarball -C $install_dir --strip-components=1 | |
| # 4. Link the binary to your local bin directory | |
| echo "Creating symlink in "$bin_dir"..." | |
| mkdir -p $bin_dir | |
| # -s creates a symbolic link, -f forces it to overwrite any existing link | |
| ln -sf $install_dir"/bin/nvim" $bin_dir"/nvim" | |
| # 5. Clean up temporary files | |
| echo "Cleaning up temporary files..." | |
| rm -f $tmp_tarball | |
| # Verify the installation was successful | |
| echo "\nInstallation complete! Installed version:" | |
| # Call the newly installed binary and grab just the first line of output | |
| $bin_dir"/nvim" --version | head -n 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment