Skip to content

Instantly share code, notes, and snippets.

@griimick
Last active April 2, 2026 23:25
Show Gist options
  • Select an option

  • Save griimick/6ea34a818513282af1033e06c6cbe2cb to your computer and use it in GitHub Desktop.

Select an option

Save griimick/6ea34a818513282af1033e06c6cbe2cb to your computer and use it in GitHub Desktop.
install nvim
#!/usr/bin/env bash
set -euo pipefail
VERSION=0.11.1
URL="https://github.com/neovim/neovim/releases/download/v0.11.1/nvim-linux-x86_64.appimage"
TMP_FILE="/tmp/nvim.appimage"
INSTALL_DIR="/usr/local/bin"
APPIMAGE_PATH="${INSTALL_DIR}/nvim"
EXTRACT_DIR="${INSTALL_DIR}/nvim-dir"
echo "[INFO] Installing Neovim ${VERSION}"
echo "[INFO] Downloading..."
curl -fL "$URL" -o "$TMP_FILE"
echo "[INFO] Making AppImage executable..."
chmod +x "$TMP_FILE"
echo "[INFO] Installing to ${INSTALL_DIR} (requires sudo)..."
sudo mv "$TMP_FILE" "$APPIMAGE_PATH"
echo "[INFO] Extracting AppImage..."
cd "$INSTALL_DIR"
sudo rm -rf "$EXTRACT_DIR"
sudo "$APPIMAGE_PATH" --appimage-extract > /dev/null
sudo mv squashfs-root "$EXTRACT_DIR"
echo "[INFO] Linking nvim binary..."
sudo ln -sf "${EXTRACT_DIR}/AppRun" "$APPIMAGE_PATH"
echo "[INFO] Verifying installation..."
nvim --version | head -n 1
echo "[SUCCESS] Neovim ${VERSION} installed globally."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment