Troubleshooting¶
Solutions to common problems.
General Diagnostics¶
Always start with:
:checkhealth
This shows the status of all major components.
Check messages:
:messages
Shows any warnings or errors.
View logs:
# Neovim logs
tail -f ~/.local/share/nvim/nvim.log
# LSP logs
tail -f ~/.local/share/nvim/lsp.log
Installation Issues¶
Error: Python not found
Problem: python3: command not found
Solution: Install Python:
# macOS
brew install python@3.11
# Linux (Debian/Ubuntu)
sudo apt-get install python3
Error: Git clone fails
Problem: fatal: unable to access repository
Possible causes:
Internet connection issue - check connectivity
Wrong URL - verify repository URL
Git not installed - install Git
Error: Permission denied
Problem: /Users/cs/.config/nvim: Permission denied
Solution: Fix permissions:
chmod -R 755 ~/.config/nvim
chmod -R 755 ~/.virtualenvs/nvim
Error: No space left on device
Check disk space:
df -h
Free up space and retry installation.
Neovim Not Found¶
Error: nvim: command not found
Cause: Neovim not installed or not in PATH.
Fix for Homebrew installation:
brew install neovim
Fix for binary installation:
Verify binary exists:
ls -la ~/apps/neovim/nvim.app/bin/nvim # macOS ls -la ~/apps/neovim/nvim.appimage # Linux
Add to PATH:
export PATH=$HOME/apps/neovim/nvim.app/bin:$PATH
Add to shell profile (
~/.bashrcor~/.zshrc):export PATH=$HOME/.local/bin:$PATH
Verify installation:
which nvim
nvim --version
Python Virtual Environment Issues¶
Error: Virtual environment not found
Solution: Create it manually:
python3 -m venv ~/.virtualenvs/nvim
source ~/.virtualenvs/nvim/bin/activate
pip install pynvim zuban ruff "darker[isort]"
deactivate
Error: ModuleNotFoundError: No module named ‘pynvim’
Solution: Install missing package:
~/.virtualenvs/nvim/bin/pip install pynvim
Error: Python version mismatch
Neovim uses the Python from ~/.virtualenvs/nvim/. To check:
~/.virtualenvs/nvim/bin/python --version
Wrong Python being used:
Configure which Python in lua/lsp/lsp.lua:
settings = {
python = {
pythonPath = os.getenv('HOME') .. '/.virtualenvs/nvim/bin/python',
}
}
LSP Not Working¶
Error: LSP not activating
Check Python path:
:checkhealth pythonVerify Zuban installed:
~/.virtualenvs/nvim/bin/python -m pip list | grep zuban
If missing, install it:
~/.virtualenvs/nvim/bin/pip install zuban
Restart Neovim
Error: Go to definition not working
Possible causes:
LSP still analyzing - wait a moment
Symbol is built-in (may not work for builtins)
LSP not active - check with
:LspInfo
Try:
:LspRestart
Error: Code completion not showing
Ensure you’re in insert mode
Press
<C-x><C-o>explicitlyCheck :LspInfo for errors
Try:
:LspRestart
Error: Too many diagnostic errors
Diagnostics may be overly aggressive. Configure in lua/lsp/lsp.lua:
analysis = {
typeCheckingMode = "basic", -- Use "off" to disable
}
Error: LSP too slow
Close large files (LSP struggles with huge files)
Configure to skip large files:
function on_attach(client, bufnr) if vim.fn.getfsize(vim.fn.bufname(bufnr)) > 1000000 then client.stop() -- Don't analyze files > 1MB end end
Reduce diagnostic checking
Try:
:LspRestart
FZF Not Working¶
Error: FZF not found
Install FZF:
# macOS
brew install fzf
# Linux
sudo apt-get install fzf
Error: Ripgrep not found (used by FZF)
Install Ripgrep:
# macOS
brew install ripgrep
# Linux
sudo apt-get install ripgrep
Commands not responding:
Verify FZF installed:
fzf --versionVerify Ripgrep installed:
rg --versionRestart Neovim
Check if directory is huge (too many files)
Slow searches:
Large directories slow FZF. Use:
<C-g>(git files) instead of<C-f>(all files)Add exclusions in
lua/plugin/fzf-lua.lua
Missing search results:
Files may be in .gitignore. To search all files:
<C-f> " All files, not just git-tracked
Keybinding Issues¶
Error: Keybinding not working
Check it’s mapped correctly:
:map <leader>x " Shows what's mapped to <leader>x
Check for typos in
lua/plugin/which-key.luaVerify syntax is correct
Restart Neovim
Error: which-key menu not showing
Check which-key is installed:
:checkhealthIf not installed, reinstall plugins:
:Lazy sync
Verify which-key is required in
init.luaRestart Neovim
Error: Keybinding conflicts
If a keybinding does something unexpected:
View all keybindings:
:map " All mappings :map <leader> " Leader key mappings
Find conflicting binding
Comment out or change it in
lua/plugin/which-key.luaRestart Neovim
Syntax Highlighting Issues¶
Error: Treesitter parsers missing
Install parsers:
:TSInstall python lua comment vim vimdoc c sql query
Error: Colors look wrong
Check colorscheme:
:colorscheme " Shows current scheme
Verify terminal supports colors:
echo $TERM # Should be: xterm-256color or similar
Ensure Nerd Font is installed:
See Requirements for Nerd Font setup
Error: Icons not displaying
Install a Nerd Font (see Requirements)
Set as terminal font in settings
Restart terminal and Neovim
Performance Issues¶
Slow startup:
Profile to find bottleneck:
nvim --startuptime startup.log +q
sort -k2 -n startup.log | tail -20
Common culprits:
Heavy plugins
Large config files
Disk I/O issues
Too many language servers
Slow editing:
Close unused buffers:
:bdDisable expensive features:
:set updatetime=500 " Increase LSP check interval
Close very large files
Check disk space
High CPU usage:
Check which plugin:
:profile start profile.log :profile func * " ... do something slow ... :profile pause " Check profile.log
Disable that plugin or configure it
Restart Neovim
Configuration Errors¶
Error: Lua syntax error
Check the error:
:checkhealth
:messages
Likely causes:
Missing comma in table
Unclosed parenthesis
Wrong function name
Missing quotes
Error: File not found
When loading configuration:
Error: No such file or directory: lua/plugin/missing.lua
Solution: Create the missing file or remove the require statement.
Error: Undefined variable
Error: undefined global 'some_variable'
Solution: Define the variable or check the name.
File Permissions¶
Error: Permission denied
chmod -R 755 ~/.config/nvim
chmod -R 755 ~/.dotfiles/nvim
Cannot create file:
Check directory permissions:
ls -la ~/.config/
Neovim Crashes¶
Crash when opening file:
Note which file causes crash
Try disabling plugins one by one
Check logs:
tail -f ~/.local/share/nvim/nvim.logReport issue with file and plugin info
Crash on startup:
Check
:checkhealthfor errorsTry starting with minimal config:
nvim -u NONE
If works, find problematic plugin
Check for corrupted config files
Crash with specific command:
Note which command
Try in safe mode:
nvim -u NONE -i NONEReport with exact reproduction steps
Getting Help¶
If you can’t solve the issue:
Run diagnostics:
:checkhealth :messages
Check logs:
tail -50 ~/.local/share/nvim/nvim.log
Search issues:
Check GitHub issues for similar problems
Search troubleshooting guide
Report issue:
Include
:checkhealthoutputInclude error messages and logs
Include Neovim version:
nvim --versionInclude minimal reproduction steps
Ask community:
Neovim forums
Discord/Slack communities
GitHub discussions
Common Messages¶
Message: “Syntax error in”
Check Lua file syntax
Look for missing commas, quotes, parentheses
Check line numbers in error
Message: “Unknown option”
Check option name spelling
Verify option exists in your Neovim version
Check
:helpfor correct syntax
Message: “Plugin failed to load”
Plugin may not be installed
Check for typos in require statement
Verify dependencies are met
Restart Neovim
Quick Fixes Summary¶
Most common quick fixes:
Restart Neovim - Solves 30% of issues
Run ``:checkhealth`` - Diagnoses most issues
Reinstall plugins -
:Lazy cleanthen:Lazy syncCheck virtual environment - Python issues often here
View error messages -
:messagesshows what’s wrongCheck installation - Run
python3 install.pyagain
If none of these work, see the detailed sections above or Development for how to debug further.