What's Actually Happening
You open Vim or Neovim expecting your familiar setup with all your configured plugins, but something is wrong. Plugins aren't loading, the plugin manager shows errors when syncing, new plugins won't install, or updates are stuck. Your carefully crafted configuration with key mappings, color schemes, and LSP setup is broken because the plugin manager can't properly clone, update, or load your plugins.
This happens with all major Vim/Neovim plugin managers: vim-plug, dein.vim, packer.nvim (now deprecated), and lazy.nvim. The root causes vary from network issues, Git problems, directory permissions, plugin conflicts, to configuration errors in your init.vim or init.lua files.
The Error You'll See
Plugin manager sync failures show different error messages depending on which manager you're using and what went wrong:
```bash # vim-plug errors in Vim :PlugInstall Error: git clone failed for 'https://github.com/neoclide/coc.nvim' Error: Failed to install neoclide/coc.nvim to /home/user/.vim/plugged/coc.nvim Error: git is not found in PATH
Error: PlugClean required. Remove unused plugins? (y/N) Error: Can't clean plugins, directory permission denied
:PlugUpdate Error: Failed to update neoclide/coc.nvim fatal: unable to access 'https://github.com/neoclide/coc.nvim/': Connection timed out
# vim-plug errors in Vim messages :messages "plug.vim" 450L, 14500B written Error detected while processing function plug#load[4]..plug#end: line 450: E120: Undefined variable: g:plugs Error: Plugin directory not found
# dein.vim errors in Neovim :call dein#install() Error: Failed to install 'neoclide/coc.nvim' Error: Cache directory doesn't exist: /home/user/.cache/dein Error: Git clone error: repository not found
:DeinUpdate Error: Failed to update plugins Error: Some plugins failed to install: ['coc.nvim', 'telescope.nvim']
# packer.nvim errors (legacy) :PackerSync Error: packer.nvim: Error cloning 'https://github.com/nvim-telescope/telescope.nvim' Error: Failed to install telescope.nvim Error: Compilation failed. packer_compiled.lua not found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ packer.nvim: Plugin load error ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Failed to load: telescope.nvim Reason: module 'telescope' not found
# lazy.nvim errors (current Neovim standard) :Lazy sync ERROR: lazy.nvim failed to clone "nvim-telescope/telescope.nvim". ERROR: git executable not found.
ERROR: lazy.nvim: Error running hook for "nvim-treesitter/nvim-treesitter": ERROR: Error during post-install hook for nvim-treesitter
◆ Errors: ✗ nvim-telescope/telescope.nvim (clone failed) ✗ neoclide/coc.nvim (update failed) ✗ nvim-treesitter/nvim-treesitter (hook failed)
# General Vim/Neovim startup errors nvim Error detected while processing /home/user/.config/nvim/init.lua: E5113: Error while calling lua chunk: .../lazy.nvim/lua/lazy/core/loader.lua:42: module 'telescope' not found
vim Error detected while processing /home/user/.vimrc: line 42: E117: Non-existent function: plug#begin line 45: E116: Invalid arguments for function plug#begin
# Git-related errors from plugin managers fatal: repository 'https://github.com/wrong-plugin-name/plugin' not found fatal: unable to access 'https://github.com/...': SSL certificate problem fatal: the remote end hung up unexpectedly error: RPC failed; curl 56 OpenSSL SSL read: error ```
Additional symptoms: - Plugins appear installed but don't load - Plugin commands (:Telescope, :CocCommand) not available - Statusline shows errors about missing plugins - Colorscheme not applied, default colors instead - LSP not working, no completion - Treesitter not highlighting correctly - Plugin directory exists but is empty or corrupted - Git clone works manually but fails through plugin manager
Why This Happens
- 1.Git Not Installed or Not in PATH: The plugin manager requires Git to clone repositories. If Git isn't installed or isn't in your PATH, the manager can't clone any plugins. This often happens on fresh systems or when Git was installed in a non-standard location.
- 2.Network Connectivity Issues: GitHub, GitLab, or other plugin hosts are unreachable due to network problems, proxy requirements, firewall rules, or DNS issues. Some regions require proxies to access GitHub, and plugin managers may not automatically use your Git proxy configuration.
- 3.Plugin Directory Permission Problems: The plugin installation directory (like
~/.vim/plugged/or~/.local/share/nvim/lazy/) has wrong ownership or permissions. This can happen when you ran Vim with sudo, changed user, or the directory was created by a different process. - 4.Invalid Plugin Repository URL: The plugin URL in your configuration is wrong: wrong owner name, wrong repository name, repository deleted, or repository moved. The plugin manager tries to clone from a non-existent repository.
- 5.Git SSL Certificate Issues: Your system's SSL certificates are outdated, missing, or the Git server has certificate issues. Git refuses to clone over HTTPS due to SSL verification failures. Common in corporate environments with custom CA certificates.
- 6.Plugin Manager Not Installed: You're trying to use vim-plug, dein, or lazy.nvim but the plugin manager itself isn't installed. Your init file references functions like
plug#begin()orlazy.setup()that don't exist because the manager code isn't present. - 7.Plugin Post-Install Hooks Failing: Some plugins have post-install hooks (like building binaries, compiling, or running scripts). These hooks fail due to missing dependencies (cargo, go, npm, make), compilation errors, or permission issues. nvim-treesitter commonly fails its parser installation hook.
- 8.Lua Configuration Syntax Errors: In Neovim with Lua config, syntax errors in init.lua prevent lazy.nvim or packer from running properly. A missing comma, wrong table syntax, or typo breaks the entire plugin loading process.
Step 1: Identify Which Plugin Manager You're Using and Check Status
First, determine your plugin manager and check what's currently happening.
```bash # Check what's in your Vim config cat ~/.vimrc | grep -E "plug|dein|packer|lazy"
# Check what's in your Neovim config cat ~/.config/nvim/init.lua | grep -E "plug|dein|packer|lazy" cat ~/.config/nvim/init.vim | grep -E "plug|dein|packer|lazy"
# Find which plugin manager is configured # vim-plug: call plug#begin('~/.vim/plugged') # dein: call dein#begin() # packer: require('packer').startup() # lazy: require('lazy').setup()
# Check if plugin manager is actually installed # vim-plug location ls -la ~/.vim/autoload/plug.vim ls -la ~/.local/share/nvim/site/autoload/plug.vim
# dein location ls -la ~/.cache/dein/repos/github.com/Shougo/dein.vim
# packer location ls -la ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# lazy location ls -la ~/.local/share/nvim/lazy/lazy.nvim
# Check plugin directories exist ls -la ~/.vim/plugged/ # vim-plug Vim ls -la ~/.local/share/nvim/plugged/ # vim-plug Neovim ls -la ~/.cache/dein/ # dein ls -la ~/.local/share/nvim/site/pack/packer/ # packer ls -la ~/.local/share/nvim/lazy/ # lazy
# Check Git is installed git --version which git
# Open Vim/Neovim and check messages vim -c 'messages' -c 'qa!' nvim -c 'messages' -c 'qa!' ```
Document which plugin manager you use, whether it's installed, and what plugins are failing.
Step 2: Verify Git and Network Connectivity
Git must be installed and able to reach GitHub (or other plugin hosts).
```bash # Check Git version (need at least 2.x) git --version
# If Git not found, install it: # Ubuntu/Debian: sudo apt update && sudo apt install git
# Fedora/RHEL: sudo dnf install git
# macOS: brew install git
# Arch: sudo pacman -S git
# Alpine: apk add git
# Windows (if not in PATH): # Download from https://git-scm.com/download/win
# Test Git connectivity to GitHub git ls-remote https://github.com/nvim-telescope/telescope.nvim
# If this fails, network/Git is the problem
# Check Git can clone git clone https://github.com/nvim-telescope/telescope.nvim /tmp/test-clone ls /tmp/test-clone rm -rf /tmp/test-clone
# Check DNS resolution nslookup github.com dig github.com
# Check network connectivity ping -c 3 github.com curl -I https://github.com
# If you need a proxy, configure Git: git config --global http.proxy http://proxy.company.com:8080 git config --global https.proxy https://proxy.company.com:8080
# For corporate SSL certificates: git config --global http.sslCAInfo /path/to/company-ca.crt
# Or temporarily disable SSL verification (not recommended): git config --global http.sslVerify false
# Check Git configuration git config --global --list | grep -E "proxy|ssl"
# Test clone with verbose output GIT_TRACE=1 git clone https://github.com/nvim-telescope/telescope.nvim /tmp/test-verbose
# For SSH-based plugins (git@github.com:...): ssh -T git@github.com
# If SSH fails, set up SSH keys: ssh-keygen -t ed25519 -C "your@email.com" cat ~/.ssh/id_ed25519.pub # Add to GitHub Settings > SSH Keys ```
Step 3: Install or Update Plugin Manager
The plugin manager itself must be installed before it can manage other plugins.
```bash # For vim-plug (Vim): # Download plug.vim curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Verify vim-plug is installed ls -la ~/.vim/autoload/plug.vim
# For vim-plug (Neovim): curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Verify ls -la ~/.local/share/nvim/site/autoload/plug.vim
# For dein.vim: # Create cache directory mkdir -p ~/.cache/dein/repos/github.com/Shougo/
# Clone dein.vim git clone https://github.com/Shougo/dein.vim ~/.cache/dein/repos/github.com/Shougo/dein.vim
# Verify ls -la ~/.cache/dein/repos/github.com/Shougo/dein.vim
# For lazy.nvim (current Neovim standard): # Clone lazy.nvim git clone --filter=blob:none \ https://github.com/folke/lazy.nvim.git \ --branch=stable \ ~/.local/share/nvim/lazy/lazy.nvim
# Verify ls -la ~/.local/share/nvim/lazy/lazy.nvim
# For packer.nvim (deprecated but still in use): git clone --depth 1 https://github.com/wbthomason/packer.nvim \ ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Verify ls -la ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Alternative: Bootstrap in config file # For vim-plug in .vimrc: vim ~/.vimrc ```
Add bootstrap code at the top:
``vim
" Auto-install vim-plug if not present
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
# For lazy.nvim in init.lua:
vim ~/.config/nvim/init.luaAdd bootstrap at the top:
``lua
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
Step 4: Fix Directory Permissions
Ensure the plugin directories have correct ownership and permissions.
```bash # Check current permissions on plugin directories ls -la ~/.vim/ ls -la ~/.vim/plugged/ ls -la ~/.local/share/nvim/ ls -la ~/.local/share/nvim/lazy/
# Check who owns these directories stat ~/.vim/plugged/ stat ~/.local/share/nvim/lazy/
# If owned by root or wrong user (from sudo vim), fix ownership: sudo chown -R $USER:$USER ~/.vim/ sudo chown -R $USER:$USER ~/.local/share/nvim/
# Fix permissions (should be writable by you) chmod -R u+rw ~/.vim/ chmod -R u+rw ~/.local/share/nvim/
# For dein: sudo chown -R $USER:$USER ~/.cache/dein/ chmod -R u+rw ~/.cache/dein/
# Create directories if missing mkdir -p ~/.vim/plugged mkdir -p ~/.vim/autoload mkdir -p ~/.local/share/nvim/lazy mkdir -p ~/.local/share/nvim/site/autoload mkdir -p ~/.cache/dein
# Verify you can write to these directories touch ~/.vim/plugged/test-write && rm ~/.vim/plugged/test-write && echo "Vim plugged writable" touch ~/.local/share/nvim/lazy/test-write && rm ~/.local/share/nvim/lazy/test-write && echo "Neovim lazy writable"
# Check the entire path is accessible namei -l ~/.vim/plugged/ namei -l ~/.local/share/nvim/lazy/ ```
Step 5: Clean and Reinstall Corrupted Plugins
Remove corrupted or incomplete plugin installations and reinstall fresh.
```bash # For vim-plug: Remove all plugins and reinstall rm -rf ~/.vim/plugged/* rm -rf ~/.local/share/nvim/plugged/*
# Open Vim and reinstall vim -c 'PlugInstall' -c 'qa!' # Or in Vim: :PlugInstall
# For specific plugin that's corrupted: rm -rf ~/.vim/plugged/telescope.nvim vim -c 'PlugInstall telescope.nvim' -c 'qa!'
# For dein: Clear cache and reinstall rm -rf ~/.cache/dein/* rm -rf ~/.cache/dein/.cache
# Reinstall dein first git clone https://github.com/Shougo/dein.vim ~/.cache/dein/repos/github.com/Shougo/dein.vim
# Then reinstall plugins in Neovim: nvim -c 'call dein#install()' -c 'qa!'
# For lazy.nvim: Clean and reinstall rm -rf ~/.local/share/nvim/lazy/* # Keep lazy.nvim itself git clone --filter=blob:none https://github.com/folke/lazy.nvim.git --branch=stable ~/.local/share/nvim/lazy/lazy.nvim
# Open Neovim to trigger install nvim :Lazy sync
# Or remove specific plugin: rm -rf ~/.local/share/nvim/lazy/telescope.nvim nvim -c 'Lazy sync' -c 'qa!'
# For packer: Clean compiled file and reinstall rm -rf ~/.local/share/nvim/site/pack/packer/* rm -f ~/.config/nvim/plugin/packer_compiled.lua
# Reinstall packer first git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Sync plugins nvim -c 'PackerSync' -c 'qa!'
# Manual clone of a problematic plugin: git clone https://github.com/nvim-telescope/telescope.nvim ~/.local/share/nvim/lazy/telescope.nvim ```
Step 6: Fix Configuration Syntax Errors
Lua configuration errors in init.lua prevent plugins from loading.
```bash # Check init.lua for syntax errors luac -p ~/.config/nvim/init.lua # If errors found, fix them
# Common Lua syntax errors to check for: cat ~/.config/nvim/init.lua
# Look for: # - Missing commas in tables # - Missing closing brackets/braces # - Wrong quotes (' vs " vs [[ ]]) # - Typos in require paths # - Undefined variables
# Use a Lua linter if available: # Install luacheck: sudo apt install lua-check # Debian/Ubuntu brew install luacheck # macOS sudo pacman -S luacheck # Arch
luacheck ~/.config/nvim/init.lua
# Check for common mistakes in plugin specs: grep -n "require" ~/.config/nvim/init.lua
# Validate table syntax: grep -n "{" ~/.config/nvim/init.lua | head -30 grep -n "}" ~/.config/nvim/init.lua | head -30
# Check for proper lazy.nvim setup: grep -A50 "require('lazy').setup" ~/.config/nvim/init.lua
# Example correct lazy.nvim config: cat > ~/.config/nvim/init.lua.example << 'EOF' -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath, }) end vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" }, { "neoclide/coc.nvim", branch = "release", }, }) EOF
# Check vim-plug config syntax in .vimrc: cat ~/.vimrc | grep -A20 "plug#begin"
# Common vim-plug mistakes: # - plug#begin and plug#end missing or misplaced # - Plugin declarations outside plug#begin/end block # - Wrong function names (Plug vs plug)
# Example correct vim-plug config: cat > ~/.vimrc.example << 'EOF' call plug#begin('~/.vim/plugged') Plug 'nvim-telescope/telescope.nvim' Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() EOF ```
Step 7: Fix Plugin Post-Install Hook Failures
Some plugins require post-install actions that can fail.
```bash # Common plugins with post-install hooks: # nvim-treesitter: needs to install parsers # coc.nvim: needs to build extension # telescope: sometimes needs build steps
# For nvim-treesitter parser installation failures: # Check if tree-sitter CLI is available: tree-sitter --version
# Install tree-sitter if needed: cargo install tree-sitter-cli # Or: npm install -g tree-sitter-cli
# Manually install parsers in Neovim: nvim -c 'TSInstallSync all' -c 'qa!'
# Or install specific parsers: nvim -c 'TSInstall lua python javascript' -c 'qa!'
# Check treesitter parser status: nvim -c 'TSInstallInfo' -c 'qa!'
# For coc.nvim build failures: # Check if node/npm is installed: node --version npm --version
# Install Node.js if missing: # Ubuntu/Debian: sudo apt install nodejs npm
# macOS: brew install node
# Arch: sudo pacman -S nodejs npm
# Build coc.nvim manually: cd ~/.vim/plugged/coc.nvim # vim-plug # Or: cd ~/.local/share/nvim/lazy/coc.nvim # lazy.nvim
npm ci npm run build
# For telescope.nvim build issues: cd ~/.local/share/nvim/lazy/telescope.nvim make # If Makefile exists
# Or use lazy.nvim build hook: # In init.lua, add build command: { "nvim-telescope/telescope.nvim", build = "make", # or other build command }
# For Lua-based plugins requiring luarocks: luarocks --version
# Install LuaRocks if needed: # Ubuntu/Debian: sudo apt install luarocks
# macOS: brew install luarocks
# Check all plugin dependencies are installed: # In lazy.nvim, check health: nvim -c 'Lazy health' -c 'qa!' ```
Step 8: Test Plugin Manager Sync
After fixes, run a clean sync to install all plugins.
```bash # For vim-plug: vim -c 'PlugClean' -c 'PlugInstall' -c 'qa!' # Or interactive: vim :PlugClean # Remove unused :PlugInstall # Install missing :PlugUpdate # Update all
# Check vim-plug log: cat ~/.vim/plugged/.vim-plug.log
# For lazy.nvim: nvim -c 'Lazy sync' -c 'qa!' # Or interactive: nvim :Lazy sync :Lazy clean :Lazy install
# Check lazy.nvim log: cat ~/.local/share/nvim/lazy/log
# For dein: nvim -c 'call dein#clear_cache()' -c 'call dein#install()' -c 'qa!' # Or: nvim :call dein#install() :call dein#update()
# For packer: nvim -c 'PackerSync' -c 'qa!' # Or: nvim :PackerSync :PackerClean :PackerInstall
# Watch for errors during sync: nvim +Lazy # Press 'S' to sync # Press 'x' to view errors
# Check installed plugins: # vim-plug: ls ~/.vim/plugged/ ls ~/.local/share/nvim/plugged/
# lazy.nvim: ls ~/.local/share/nvim/lazy/
# packer: ls ~/.local/share/nvim/site/pack/packer/start/ ls ~/.local/share/nvim/site/pack/packer/opt/
# Verify specific plugin is installed: ls ~/.local/share/nvim/lazy/telescope.nvim/ ls ~/.local/share/nvim/lazy/telescope.nvim/lua/telescope/ ```
Step 9: Verify Plugins Are Loading Correctly
Check that installed plugins are actually being loaded by Vim/Neovim.
```bash # Check runtimepath includes plugin directories vim -c 'echo &rtp' -c 'qa!' nvim -c 'echo &rtp' -c 'qa!'
# Should include plugin paths like: # ~/.vim/plugged/telescope.nvim # ~/.local/share/nvim/lazy/telescope.nvim
# Check specific plugin is loaded: vim -c 'echo globpath(&rtp, "autoload/plug.vim")' -c 'qa!'
nvim -c 'lua print(vim.api.nvim_get_runtime_file("lua/telescope/init.lua", false)[1])' -c 'qa!'
# Test plugin commands work: nvim -c 'Telescope find_files' -c 'qa!' # Should open telescope (then quit)
# Check for Lua module availability: nvim -c 'lua print(require("telescope") ~= nil)' -c 'qa!' # Should print: true
# If false, module isn't loaded
# Check plugin health in Neovim: nvim -c 'checkhealth telescope' -c 'qa!'
# Check loaded plugins list: nvim -c 'lua print(vim.inspect(require("lazy").plugins()))' -c 'qa!'
# For vim-plug, check loaded plugins: vim -c 'echo split(&rtp, ",")' -c 'qa!'
# Check for any remaining errors: nvim -c 'messages' -c 'qa!' vim -c 'messages' -c 'qa!'
# Look for: # - E117: Non-existent function # - E121: Undefined variable # - module not found errors
# Test plugin functionality: nvim << 'EOF' :lua require('telescope.builtin').find_files() :q EOF
# Check plugin specific health: nvim +checkhealth # Navigate through health checks ```
Step 10: Create Backup and Prevent Future Issues
Set up backup and locking mechanisms to prevent future sync failures.
```bash # Backup your config files: mkdir -p ~/.config/nvim-backup cp ~/.config/nvim/init.lua ~/.config/nvim-backup/init.lua.$(date +%Y%m%d) cp -r ~/.config/nvim ~/.config/nvim-backup/nvim-$(date +%Y%m%d)
cp ~/.vimrc ~/.vimrc-backup.$(date +%Y%m%d) cp -r ~/.vim ~/.vim-backup-$(date +%Y%m%d)
# For lazy.nvim, enable locking: # Add to init.lua: vim ~/.config/nvim/init.lua ```
require("lazy").setup({
spec = {
-- your plugins
},
lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json",
-- Enable lockfile to pin versions
})```bash # Generate lockfile after successful sync: nvim -c 'Lazy snapshot save' -c 'qa!'
# View lockfile: cat ~/.local/share/nvim/lazy-lock.json
# To restore from lockfile later: nvim -c 'Lazy restore' -c 'qa!'
# For vim-plug, use pinned versions: # In .vimrc, specify commit/tag/branch: Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } Plug 'neoclide/coc.nvim', { 'commit': 'a123bcd' }
# Create a restore script: cat > ~/.config/nvim/scripts/plugin-restore.sh << 'EOF' #!/bin/bash # Plugin Manager Restore Script
# Backup current state BACKUP_DIR=~/.config/nvim-backup/plugins-$(date +%Y%m%d-%H%M%S) mkdir -p $BACKUP_DIR cp -r ~/.local/share/nvim/lazy $BACKUP_DIR/ cp ~/.local/share/nvim/lazy-lock.json $BACKUP_DIR/
# Restore from lockfile nvim -c 'Lazy restore' -c 'qa!'
echo "Plugins restored from lockfile" EOF
chmod +x ~/.config/nvim/scripts/plugin-restore.sh
# Add to git for config tracking: cd ~/.config/nvim git init git add init.lua lazy-lock.json git commit -m "Initial nvim config"
# Create a periodic backup script: cat > ~/.config/nvim/scripts/daily-backup.sh << 'EOF' #!/bin/bash DATE=$(date +%Y%m%d) BACKUP=~/.config/nvim-backup/auto-$DATE
mkdir -p $BACKUP cp ~/.config/nvim/init.lua $BACKUP/ cp ~/.local/share/nvim/lazy-lock.json $BACKUP/
# Keep only last 7 backups ls -t ~/.config/nvim-backup/auto-* | tail -n +8 | xargs rm -rf
echo "Backup created: $BACKUP" EOF
chmod +x ~/.config/nvim/scripts/daily-backup.sh
# Add to crontab: (crontab -l 2>/dev/null; echo "0 0 * * * ~/.config/nvim/scripts/daily-backup.sh") | crontab - ```
Checklist for Fixing Vim/Neovim Plugin Manager Sync
| Step | Action | Command | Status |
|---|---|---|---|
| 1 | Identify plugin manager and status | ls ~/.vim/autoload/plug.vim, ls ~/.local/share/nvim/lazy/lazy.nvim | ☐ |
| 2 | Verify Git and network connectivity | git ls-remote https://github.com/plugin/repo | ☐ |
| 3 | Install or update plugin manager | Download vim-plug or clone lazy.nvim | ☐ |
| 4 | Fix directory permissions | chown -R $USER:$USER ~/.local/share/nvim/ | ☐ |
| 5 | Clean and reinstall corrupted plugins | rm -rf ~/.local/share/nvim/lazy/* | ☐ |
| 6 | Fix configuration syntax errors | luac -p ~/.config/nvim/init.lua | ☐ |
| 7 | Fix post-install hook failures | Install dependencies (node, tree-sitter) | ☐ |
| 8 | Test plugin manager sync | nvim -c 'Lazy sync' -c 'qa!' | ☐ |
| 9 | Verify plugins are loading | nvim -c 'lua print(require("telescope"))' | ☐ |
| 10 | Create backup and prevent future issues | Enable lockfile, create backup script | ☐ |
Verify the Fix
After fixing plugin manager issues, verify everything works:
```bash # 1. Plugin manager syncs without errors nvim -c 'Lazy sync' -c 'qa!' # Or: vim -c 'PlugInstall' -c 'qa!' # Should complete without errors
# 2. All plugins installed ls ~/.local/share/nvim/lazy/ # Should show all configured plugins
# 3. Plugins are in runtimepath nvim -c 'echo &rtp' -c 'qa!' # Should include plugin directories
# 4. Plugin commands available nvim -c 'Telescope find_files' -c 'qa!' # Should open Telescope picker
# 5. Lua modules load nvim -c 'lua print(require("telescope") ~= nil)' -c 'qa!' # Should print: true
# 6. No errors on startup nvim -c 'messages' -c 'qa!' # Should have no error messages
# 7. Colorscheme applies correctly nvim -c 'colorscheme gruvbox' -c 'qa!' # Should not error
# 8. LSP/completion works (if coc.nvim installed) nvim test.lua # Type and see completions appear
# 9. Treesitter highlighting active nvim -c 'TSInstallInfo' -c 'qa!' # Should show parsers installed and active
# 10. Lockfile exists and is valid cat ~/.local/share/nvim/lazy-lock.json # Should show pinned versions ```
Related Issues
- [Fix VSCode Extension Install Failed](/articles/fix-vscode-extension-install-failed) - VSCode extension issues
- [Fix Git Clone Failed Repository Not Found](/articles/fix-git-clone-failed-repository-not-found) - Git clone errors
- [Fix Git SSL Certificate Problem](/articles/fix-git-ssl-certificate-problem) - Git SSL issues
- [Fix Lua Module Not Found](/articles/fix-lua-module-not-found) - Lua runtime issues
- [Fix Node NPM Package Install Failed](/articles/fix-node-npm-package-install-failed) - Node/NPM issues
- [Fix Python Poetry Lock Conflict](/articles/fix-python-poetry-lock-conflict) - Python dependency issues