What's Actually Happening
Your Vim or Neovim plugin manager is failing to synchronize, install, or update plugins. The sync process hangs, times out, returns errors, or silently fails without completing. This can happen with various plugin managers like vim-plug, Vundle, dein.vim, packer.nvim, or lazy.nvim. The failure prevents you from using your configured plugins and may leave your editor in a broken state.
Common symptoms include plugins not loading after installation, errors about missing directories or files, git clone failures, network timeout errors, or plugins stuck in pending states. This impacts your development workflow by leaving you without essential tools like autocompletion, syntax highlighting, or language servers.
The Error You'll See
``` " Error messages in Vim/Neovim
" vim-plug errors Error: Cannot fetch plugin repository Error: Failed to clone https://github.com/author/plugin.git x plugin_name: Cloning into '/home/user/.local/share/nvim/plugged/plugin_name'... fatal: unable to access 'https://github.com/author/plugin.git': Failed to connect to github.com port 443 after 21002 ms: Timeout
" Vundle errors [ERROR] Plugin 'author/plugin' not found [ERROR] Failed to clone repository
" packer.nvim errors ✗ Failed to install plugin_name Error: packer.nvim: Error running config for plugin_name Error: git clone error
" lazy.nvim errors ✗ Failed to clone lazy.nvim Error: Lazy internal error
" dein.vim errors [dein] Error: Failed to clone repository: https://github.com/author/plugin
" General errors E117: Unknown function: plug#begin E117: Unknown function: plug#end E117: Unknown function: plug#sync
" Git errors in terminal fatal: unable to access 'https://github.com/...': SSL certificate problem fatal: could not read Username for 'https://github.com': No such device or address fatal: repository 'https://github.com/author/plugin.git/' not found
" Permission errors error: could not lock config file /home/user/.local/share/nvim/plugged/plugin/.git/config: Permission denied ```
Why This Happens
- 1.Network connectivity issues: Corporate firewalls, proxy servers, or network restrictions blocking access to GitHub or GitLab. DNS resolution failures or slow connections causing timeouts.
- 2.Git configuration problems: Missing git credentials, incorrect git configuration, SSL certificate issues, or git not being in the system PATH.
- 3.Plugin directory permissions: Plugin installation directory doesn't exist, has wrong permissions, or is owned by a different user.
- 4.Invalid plugin repository: Plugin URL is incorrect, plugin was deleted, repository was renamed, or moved to a different location.
- 5.Plugin manager not installed: The plugin manager itself (vim-plug, packer, etc.) isn't installed or the installation is corrupted.
- 6.Version conflicts: Plugin requires newer Vim/Neovim version, incompatible with your current version, or conflicts with other plugins.
- 7.Shell environment issues: Vim can't find git in PATH, shell environment variables not loaded, or running in restricted environment.
- 8.Concurrent installation conflicts: Multiple instances trying to install plugins simultaneously, or previous installation left lock files.
- 9.Disk space issues: Insufficient disk space for plugin installation or temporary files.
- 10.Plugin manager misconfiguration: Wrong plugin directory path, incorrect init.vim or init.lua syntax, or conflicting plugin specifications.
Step 1: Check Plugin Manager Installation
Verify the plugin manager is properly installed:
```bash # Check if vim-plug is installed (Vim) ls -la ~/.vim/autoload/plug.vim
# Check if vim-plug is installed (Neovim) ls -la ~/.local/share/nvim/site/autoload/plug.vim ls -la ~/.config/nvim/autoload/plug.vim
# Check if packer.nvim is installed ls -la ~/.local/share/nvim/site/pack/packer/start/packer.nvim ls -la ~/.local/share/nvim/pack/packer/start/packer.nvim
# Check if dein.vim is installed ls -la ~/.cache/dein/repos/github.com/Shougo/dein.vim
# Check if lazy.nvim is installed ls -la ~/.local/share/nvim/lazy/lazy.nvim
# Check if Vundle is installed ls -la ~/.vim/bundle/Vundle.vim
# If not installed, install manually
# Install vim-plug for Vim curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Install vim-plug for Neovim sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# Install packer.nvim git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Install lazy.nvim git clone --filter=blob:none \ --branch=stable \ https://github.com/folke/lazy.nvim.git \ --single-branch \ ~/.local/share/nvim/lazy/lazy.nvim
# Install dein.vim curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh sh ./installer.sh ~/.cache/dein
# Install Vundle git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim ```
Verify Vim/Neovim can find the plugin manager:
```vim " In Vim/Neovim, check if plug functions exist :echo exists('*plug#begin') " Should return 1
" Check plugin manager location :echo globpath(&rtp, 'autoload/plug.vim') " Should show path to plug.vim
" Check runtime path :set rtp? " Should include plugin directories
" Debug plugin manager :let g:plug_window = 'vertical topleft new' :PlugStatus ```
Step 2: Verify Git and Network Connectivity
Ensure git works and network is accessible:
```bash # Check git is installed which git git --version
# Check if git can access GitHub git ls-remote https://github.com/junegunn/vim-plug
# Test with verbose output GIT_CURL_VERBOSE=1 git ls-remote https://github.com/junegunn/vim-plug
# Check network connectivity ping -c 3 github.com curl -v https://github.com curl -v https://raw.githubusercontent.com
# Check if behind proxy echo $HTTP_PROXY echo $HTTPS_PROXY echo $http_proxy echo $https_proxy echo $NO_PROXY
# Check DNS resolution nslookup github.com dig github.com
# Test SSH vs HTTPS git clone https://github.com/junegunn/vim-plug.git /tmp/test-https git clone git@github.com:junegunn/vim-plug.git /tmp/test-ssh
# Check git SSL git config --global http.sslVerify true git config --global http.sslCAInfo /etc/ssl/certs/ca-certificates.crt
# If behind corporate firewall, configure proxy git config --global http.proxy http://proxy.company.com:8080 git config --global https.proxy https://proxy.company.com:8080
# For self-signed certificates git config --global http.sslVerify false # Only for testing! # Better: add CA to trust store git config --global http.sslCAInfo /path/to/corporate-ca.crt
# Test git clone with timeout GIT_SSL_NO_VERIFY=1 git clone --depth 1 https://github.com/junegunn/vim-plug.git /tmp/test-clone
# Increase git timeout git config --global http.lowSpeedLimit 1000 git config --global http.lowSpeedTime 300 ```
Test git from within Vim:
```vim " Test git from Vim :!git --version :!git ls-remote https://github.com/junegunn/vim-plug
" Check if shell can find git :echo system('which git') :echo system('git --version')
" Check PATH in Vim :echo $PATH :echo expand('$PATH')
" Test network from Vim :!curl -v https://github.com :!ping -c 3 github.com ```
Step 3: Check and Fix Directory Permissions
Ensure plugin directories have correct permissions:
```bash # Check plugin directories exist and have correct permissions
# For Vim ls -la ~/.vim/ ls -la ~/.vim/autoload/ ls -la ~/.vim/plugged/
# For Neovim ls -la ~/.local/share/nvim/ ls -la ~/.local/share/nvim/site/ ls -la ~/.local/share/nvim/plugged/ # vim-plug ls -la ~/.local/share/nvim/pack/ # packer ls -la ~/.local/share/nvim/lazy/ # lazy.nvim ls -la ~/.cache/dein/ # dein.vim ls -la ~/.cache/nvim/ # Neovim cache
# Create missing directories mkdir -p ~/.vim/autoload mkdir -p ~/.vim/plugged mkdir -p ~/.local/share/nvim/site/autoload mkdir -p ~/.local/share/nvim/plugged mkdir -p ~/.local/share/nvim/pack/packer/start mkdir -p ~/.local/share/nvim/lazy mkdir -p ~/.cache/dein
# Fix permissions chmod 755 ~/.vim chmod 755 ~/.vim/autoload chmod 755 ~/.vim/plugged chmod -R 755 ~/.local/share/nvim/ chmod -R 755 ~/.cache/dein chmod -R 755 ~/.cache/nvim
# Fix ownership (if needed) chown -R $USER:$USER ~/.vim chown -R $USER:$USER ~/.local/share/nvim chown -R $USER:$USER ~/.cache/dein chown -R $USER:$USER ~/.cache/nvim
# Check disk space df -h ~ df -h ~/.local/share/nvim ```
Check and remove lock files:
```bash # Check for lock files that might be blocking find ~/.vim -name "*.lock" -type f find ~/.local/share/nvim -name "*.lock" -type f find ~/.cache -name "*.lock" -type f
# Remove lock files if stuck rm -f ~/.vim/plugged/.git/index.lock rm -f ~/.local/share/nvim/plugged/*/.git/index.lock rm -f ~/.local/share/nvim/pack/packer/*/.git/index.lock rm -f ~/.local/share/nvim/lazy/*/.git/index.lock
# Clean up partial installations find ~/.vim/plugged -name "*.part" -type f -delete find ~/.local/share/nvim -name "*.part" -type f -delete ```
Step 4: Fix vim-plug Configuration and Sync
Configure and sync plugins with vim-plug:
```vim " Basic vim-plug configuration " ~/.vimrc or ~/.config/nvim/init.vim
" Specify plugin directory let g:plug_window = 'vertical topleft new' let g:plug_url_format = 'https://github.com/%s.git'
" Use shallow clones (faster) let g:plug_shallow = 1
" Set timeout (seconds) let g:plug_timeout = 60
" Enable parallel installation let g:plug_threads = 16
call plug#begin('~/.vim/plugged') " or for Neovim: call plug#begin('~/.local/share/nvim/plugged')
" Essential plugins Plug 'junegunn/vim-plug' " Plugin manager (self-manage) Plug 'tpope/vim-sensible' " Sensible defaults Plug 'tpope/vim-fugitive' " Git integration Plug 'tpope/vim-surround' " Surround text objects Plug 'preservim/nerdtree' " File explorer Plug 'vim-airline/vim-airline' " Status line
" Language support Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'dense-analysis/ale' Plug 'sheerun/vim-polyglot'
" Fuzzy finder Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim'
" Themes Plug 'morhetz/gruvbox' Plug 'dracula/vim', { 'as': 'dracula' }
call plug#end()
" Key mappings for plugin management nnoremap <Leader>pi :PlugInstall<CR> nnoremap <Leader>pu :PlugUpdate<CR> nnoremap <Leader>pc :PlugClean<CR> nnoremap <Leader>ps :PlugStatus<CR> nnoremap <Leader>pd :PlugDiff<CR> ```
Run vim-plug sync:
```vim " In Vim/Neovim command mode
" Install plugins :PlugInstall
" Update plugins :PlugUpdate
" Clean removed plugins :PlugClean
" Check status :PlugStatus
" View differences :PlugDiff
" Upgrade vim-plug itself :PlugUpgrade
" Debug mode :let g:plug_verbose = 1 :PlugInstall
" Force reinstall specific plugin :Plug 'author/plugin', { 'on': [] } " Disable lazy loading " Then run :PlugInstall ```
```bash # Sync from command line nvim --headless +PlugInstall +qall nvim --headless +PlugUpdate +qall nvim --headless +PlugClean +qall
# With verbose output nvim --headless -c 'let g:plug_verbose = 1' -c 'PlugInstall' -c 'qa!'
# Sync specific plugin nvim --headless "+PlugInstall! plugin_name" +qall ```
Step 5: Fix packer.nvim Configuration and Sync
Configure and sync plugins with packer.nvim:
```lua -- ~/.config/nvim/lua/plugins/init.lua -- or ~/.config/nim/init.lua
-- Initialize packer local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) vim.cmd [[packadd packer.nvim]] return true end return false end
local packer_bootstrap = ensure_packer()
-- Use packer require('packer').startup(function(use) -- Packer can manage itself use 'wbthomason/packer.nvim'
-- LSP and completion use { 'neovim/nvim-lspconfig', config = function() require('lspconfig').pyright.setup{} end }
use { 'hrsh7th/nvim-cmp', requires = { 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', }, config = function() require('cmp').setup({ sources = { { name = 'nvim_lsp' }, { name = 'buffer' }, { name = 'path' }, } }) end }
-- Treesitter use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function() require('nvim-treesitter.configs').setup{ ensure_installed = 'all', highlight = { enable = true } } end }
-- File explorer use { 'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons' }, config = function() require('nvim-tree').setup{} end }
-- Fuzzy finder use { 'nvim-telescope/telescope.nvim', requires = { 'nvim-lua/plenary.nvim' } }
-- Git use 'tpope/vim-fugitive' use 'lewis6991/gitsigns.nvim'
-- Theme use 'morhetz/gruvbox' use 'folke/tokyonight.nvim'
-- Automatically set up configuration after cloning packer.nvim if packer_bootstrap then require('packer').sync() end end)
-- Key mappings vim.keymap.set('n', '<Leader>ps', ':PackerSync<CR>') vim.keymap.set('n', '<Leader>pi', ':PackerInstall<CR>') vim.keymap.set('n', '<Leader>pc', ':PackerClean<CR>') vim.keymap.set('n', '<Leader>pu', ':PackerUpdate<CR>') ```
Run packer sync:
```vim " In Neovim command mode :PackerSync :PackerInstall :PackerUpdate :PackerClean :PackerCompile :PackerStatus
" With profile :PackerSync profile ```
```bash # Sync from command line nvim --headless +PackerSync +qall nvim --headless +PackerInstall +qall
# Compile nvim --headless +PackerCompile +qall ```
Debug packer issues:
```lua -- Add to config for debugging vim.cmd [[ let g:packer_verbose = 1 ]]
-- Check packer log -- :messages -- or check ~/.cache/nvim/packer.nvim.log
-- Reset packer if completely broken vim.cmd [[ !rm -rf ~/.local/share/nvim/pack/packer !rm -rf ~/.config/nvim/plugin/packer_compiled.lua ]]
-- Then run :PackerSync again ```
Step 6: Fix lazy.nvim Configuration and Sync
Configure and sync plugins with lazy.nvim:
```lua -- ~/.config/nvim/init.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", -- latest stable release lazypath, }) end vim.opt.rtp:prepend(lazypath)
-- Configure lazy require("lazy").setup({ -- Import plugins { import = "plugins" },
-- Or define plugins here { "neovim/nvim-lspconfig", config = function() require("lspconfig").pyright.setup {} end, },
{ "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", }, config = function() require("cmp").setup({ sources = { { name = "nvim_lsp" }, { name = "buffer" }, }, }) end, },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", config = function() require("nvim-treesitter.configs").setup({ ensure_installed = "all", highlight = { enable = true }, }) end, },
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" }, },
-- Colorscheme "folke/tokyonight.nvim", "morhetz/gruvbox",
-- Git "tpope/vim-fugitive", { "lewis6991/gitsigns.nvim", config = function() require("gitsigns").setup() end, },
-- Performance options performance = { rtp = { disabled_plugins = { "gzip", "tarPlugin", "tohtml", "tutor", "zipPlugin", }, }, }, }) ```
Run lazy sync:
" In Neovim
:Lazy
:Lazy sync
:Lazy install
:Lazy update
:Lazy clean
:Lazy clear " Clear cache
:Lazy health
:Lazy profile
:Lazy log# Sync from command line
nvim --headless "+Lazy! sync" +qa
nvim --headless "+Lazy! install" +qa
nvim --headless "+Lazy! clean" +qaStep 7: Handle Network and Proxy Issues
Fix network-related sync failures:
```bash # Configure git for proxy git config --global http.proxy http://proxy.company.com:8080 git config --global https.proxy http://proxy.company.com:8080
# Or with authentication git config --global http.proxy http://user:pass@proxy.company.com:8080
# Configure git to use SSH instead of HTTPS git config --global url."git@github.com:".insteadOf "https://github.com/"
# Or for specific repos git config --global url."git@github.com:junegunn/".insteadOf "https://github.com/junegunn/"
# Configure for corporate CA git config --global http.sslCAInfo /etc/ssl/certs/corporate-ca.crt
# Test git with verbose GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone https://github.com/junegunn/vim-plug.git /tmp/test ```
Configure plugin managers to use SSH:
```vim " vim-plug: Use SSH for GitHub let g:plug_url_format = 'git@github.com:%s.git'
" Or configure git to use SSH for all GitHub repos " In ~/.gitconfig: " [url "git@github.com:"] " insteadOf = "https://github.com/"
call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf' Plug 'tpope/vim-fugitive' call plug#end() ```
```lua -- lazy.nvim: Configure git require("lazy").setup({ -- plugins }, { git = { url_format = "git@github.com:%s.git", -- or keep https but with specific settings timeout = 120, -- seconds } })
-- packer.nvim: Use SSH for specific plugins use { 'junegunn/fzf', url = 'git@github.com:junegunn/fzf.git' } ```
For corporate firewalls with self-signed certificates:
```bash # Get corporate CA certificate # Usually from IT department or extracted from browser
# Add to git trust store git config --global http.sslCAInfo /path/to/corporate-ca.crt
# Or for testing only (not recommended for production) git config --global http.sslVerify false
# Alternative: Use system cert bundle git config --global http.sslBackend openssl git config --global http.sslCAInfo /etc/ssl/certs/ca-certificates.crt ```
Step 8: Fix Specific Plugin Issues
Handle individual plugin problems:
```bash # Check if plugin repository exists git ls-remote https://github.com/author/plugin.git
# Clone manually to diagnose git clone --depth 1 https://github.com/author/plugin.git /tmp/test-clone
# If repo was renamed or moved # Check for redirects curl -I https://github.com/old-name/plugin # Update plugin source in config ```
```vim " Fix specific plugin issues in vim-plug
" Plugin not found - check URL Plug 'author/plugin' " Make sure this is correct
" Plugin requires build step Plug 'junegunn/fzf', { 'do': './install --all' } Plug 'plasticboy/vim-markdown', { 'do': 'make' }
" Plugin has different branch Plug 'author/plugin', { 'branch': 'develop' } Plug 'neoclide/coc.nvim', { 'branch': 'release' }
" Plugin needs post-install hook Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ }
" Plugin requires specific tag or commit Plug 'author/plugin', { 'tag': 'v1.0.0' } Plug 'author/plugin', { 'commit': 'abc123' }
" Disable plugin temporarily Plug 'author/plugin', { 'on': [] } " Won't load on startup
" Plugin with dependencies Plug 'tpope/vim-repeat' Plug 'tpope/vim-surround', { 'depends': 'vim-repeat' }
" Force reinstall " Delete plugin directory and run :PlugInstall " :!rm -rf ~/.vim/plugged/plugin_name " :PlugInstall plugin_name ```
```lua -- Fix specific plugin issues in lazy.nvim
-- Plugin with build step { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", }
-- Plugin with post-install hook { "iamcco/markdown-preview.nvim", build = "cd app && npm install", }
-- Plugin with specific branch { "neoclide/coc.nvim", branch = "release", }
-- Plugin with dependencies { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim", }, }
-- Plugin that's been renamed { "new-author/new-name", name = "plugin-name", -- Keep old name if needed }
-- Lazy loading { "author/plugin", event = "VimEnter", -- Load on event cmd = "Command", -- Load on command ft = "python", -- Load for file type keys = "<Leader>x", -- Load on key mapping }
-- Debug plugin loading :Lazy log :Lazy profile ```
Step 9: Clean and Reinstall Everything
Nuclear option - start fresh:
```bash #!/bin/bash # reset_vim_plugins.sh
# Backup configs first cp ~/.vimrc ~/.vimrc.backup cp -r ~/.config/nvim ~/.config/nvim.backup
# For Vim with vim-plug rm -rf ~/.vim/plugged rm -f ~/.vim/autoload/plug.vim
# For Neovim with various plugin managers rm -rf ~/.local/share/nvim/plugged rm -rf ~/.local/share/nvim/pack rm -rf ~/.local/share/nvim/lazy rm -rf ~/.cache/dein rm -rf ~/.cache/nvim
# Remove compiled files rm -f ~/.config/nvim/plugin/packer_compiled.lua rm -f ~/.vim/plugin/plug.vim
# Remove any lock files find ~/.vim -name "*.lock" -delete find ~/.local/share/nvim -name "*.lock" -delete find ~/.cache -name "*.lock" -delete 2>/dev/null
echo "Plugin directories cleaned. Reinstall plugin manager and run sync." ```
```bash # Reinstall vim-plug curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# For Neovim curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Reinstall packer git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Reinstall lazy.nvim git clone --filter=blob:none https://github.com/folke/lazy.nvim.git \ --branch=stable ~/.local/share/nvim/lazy/lazy.nvim
# Run sync nvim --headless +PlugInstall +qall nvim --headless +PackerSync +qall nvim --headless "+Lazy! sync" +qa ```
Step 10: Create Diagnostic Script
Build comprehensive troubleshooting:
```bash #!/bin/bash # diagnose_vim_plugins.sh
echo "=== Vim/Neovim Plugin Diagnostic ===" echo ""
echo "1. Version Information" echo "---------------------" vim --version | head -1 nvim --version | head -1 2>/dev/null || echo "Neovim not installed" echo ""
echo "2. Git Status" echo "-------------" which git git --version git config --global --list | grep -E "http|url" || echo "No relevant git config" echo ""
echo "3. Network Test" echo "---------------" echo "Testing GitHub connectivity..." curl -s -o /dev/null -w "%{http_code}" https://github.com && echo " - OK" curl -s -o /dev/null -w "%{http_code}" https://raw.githubusercontent.com && echo " - OK" echo ""
echo "4. Plugin Manager Status" echo "------------------------" echo "vim-plug (Vim):" ls -la ~/.vim/autoload/plug.vim 2>/dev/null || echo " Not installed" echo "vim-plug (Neovim):" ls -la ~/.local/share/nvim/site/autoload/plug.vim 2>/dev/null || echo " Not installed" echo "packer.nvim:" ls -la ~/.local/share/nvim/site/pack/packer/start/packer.nvim 2>/dev/null || echo " Not installed" echo "lazy.nvim:" ls -la ~/.local/share/nvim/lazy/lazy.nvim 2>/dev/null || echo " Not installed" echo ""
echo "5. Directory Permissions" echo "------------------------" ls -la ~/.vim 2>/dev/null | head -5 ls -la ~/.local/share/nvim 2>/dev/null | head -5 echo ""
echo "6. Disk Space" echo "-------------" df -h ~ | tail -1 echo ""
echo "7. Environment" echo "--------------" echo "PATH: $PATH" echo "HTTP_PROXY: $HTTP_PROXY" echo "HTTPS_PROXY: $HTTPS_PROXY" echo ""
echo "8. Config Files" echo "---------------" ls -la ~/.vimrc 2>/dev/null || echo "~/.vimrc not found" ls -la ~/.config/nvim/init.vim 2>/dev/null || echo "init.vim not found" ls -la ~/.config/nvim/init.lua 2>/dev/null || echo "init.lua not found" echo ""
echo "9. Plugin Directories" echo "--------------------" echo "Installed plugins (vim-plug):" ls ~/.vim/plugged 2>/dev/null || echo " No plugins" ls ~/.local/share/nvim/plugged 2>/dev/null || true echo "" echo "Installed plugins (packer):" ls ~/.local/share/nvim/pack/packer/start 2>/dev/null || echo " No plugins" echo ""
echo "10. Lock Files" echo "--------------" find ~/.vim -name "*.lock" 2>/dev/null || echo " No lock files" find ~/.local/share/nvim -name "*.lock" 2>/dev/null || true echo ""
echo "=== Diagnostic Complete ===" echo "" echo "To test plugin installation:" echo " nvim --headless +PlugInstall +qall" echo " nvim --headless +PackerSync +qall" echo " nvim --headless '+Lazy! sync' +qa" ```
Checklist
| Step | Action | Verified |
|---|---|---|
| 1 | Verified plugin manager installation | ☐ |
| 2 | Checked git and network connectivity | ☐ |
| 3 | Fixed directory permissions | ☐ |
| 4 | Configured vim-plug sync | ☐ |
| 5 | Configured packer.nvim sync | ☐ |
| 6 | Configured lazy.nvim sync | ☐ |
| 7 | Handled network and proxy issues | ☐ |
| 8 | Fixed specific plugin issues | ☐ |
| 9 | Cleaned and reinstalled everything | ☐ |
| 10 | Created diagnostic script | ☐ |
Verify the Fix
- 1.Test git connectivity:
- 2.```bash
- 3.git ls-remote https://github.com/junegunn/vim-plug
- 4.
` - 5.Test plugin installation:
- 6.```bash
- 7.nvim --headless +PlugInstall +qall
- 8.nvim --headless +PackerSync +qall
- 9.
` - 10.Verify plugins loaded:
- 11.```vim
- 12.:PlugStatus
- 13.:PlugList
- 14.:messages
- 15.
`
Related Issues
- [Fix Vim Neovim Syntax Highlighting Not Working](/articles/fix-vim-neovim-syntax-highlighting-not-working)
- [Fix Vim Neovim LSP Not Working](/articles/fix-vim-neovim-lsp-not-working)
- [Fix Vim Neovim Coc Nvim Install Failed](/articles/fix-vim-neovim-coc-nvim-install-failed)
- [Fix Git Clone Failed Connection Refused](/articles/fix-git-clone-failed-connection-refused)
- [Fix Vim Config Not Loading](/articles/fix-vim-config-not-loading)