Troubleshooting¶
Common issues and solutions for Neovim and LazyVim.
Diagnostic Commands¶
Health Check¶
Run comprehensive diagnostics:
Check specific components:
Plugin Information¶
LSP Information¶
Plugin Issues¶
Plugins Not Loading¶
- Check lazy-lock.json: Ensure it exists and is valid JSON
- Sync plugins: Run
:Lazy sync - Check for errors: Run
:Lazy
Plugin Conflicts¶
Disable conflicting plugins:
Startup Errors¶
Check startup profile:
Run Neovim without config to isolate:
LSP Issues¶
LSP Not Starting¶
- Check if installed:
:Mason - Check LspInfo:
:LspInfo - Check logs:
:LspLog
Install Missing Server¶
Or automatically:
-- lua/plugins/lsp.lua
return {
"williamboman/mason-lspconfig.nvim",
opts = {
ensure_installed = { "pyright", "ruff" },
},
}
Wrong LSP Server¶
Check active servers:
Disable unwanted server:
-- lua/plugins/lsp.lua
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
tsserver = { enabled = false },
},
},
}
LSP Slow or Hanging¶
- Check file size and complexity
- Exclude large directories from analysis
- Increase timeout:
-- lua/plugins/lsp.lua
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
pyright = {
settings = {
python = {
analysis = {
diagnosticMode = "openFilesOnly",
},
},
},
},
},
},
}
Python Virtual Environment Not Detected¶
Set path manually:
Or configure in pyproject.toml:
Treesitter Issues¶
Parser Errors¶
Update parsers:
Reinstall specific parser:
Missing Syntax Highlighting¶
- Check if parser installed:
:TSInstallInfo - Install parser:
:TSInstall <language> - Check highlight status:
:TSBufToggle highlight
Treesitter Slow¶
Disable for large files:
-- lua/plugins/treesitter.lua
return {
"nvim-treesitter/nvim-treesitter",
opts = {
highlight = {
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
},
}
Keybinding Issues¶
Keybinding Not Working¶
Check if keymap exists:
Or search directly:
Keybinding Conflict¶
List all mappings for a key:
Which-key Not Showing¶
Press key and wait (default 300ms). Adjust timeout:
Display Issues¶
Icons Not Displaying¶
Install a Nerd Font:
Configure terminal to use the font.
Colors Wrong¶
Enable true colors:
Check terminal supports true color:
Cursor Shape Not Changing¶
Set cursor shape in terminal settings or:
Performance Issues¶
Slow Startup¶
Profile startup:
Identify slow plugins and lazy-load them:
Slow Editing¶
- Disable heavy features:
- Reduce update frequency:
High CPU Usage¶
Check running LSP servers:
Disable diagnostics temporarily:
Common Error Messages¶
"module not found"¶
Plugin not installed. Run:
"Invalid character"¶
Likely copy-paste issue with special characters. Check for: - Smart quotes instead of regular quotes - Non-breaking spaces - Hidden Unicode characters
"E5108: Error executing lua"¶
Syntax error in Lua config. Check:
"No information available"¶
LSP not attached. Check:
Reset Configuration¶
Soft Reset¶
Remove plugin state:
Hard Reset¶
Backup and remove everything:
Then reinstall LazyVim:
Getting Help¶
Documentation¶
LazyVim Resources¶
Debug Output¶
Enable verbose logging:
Check the log file after reproducing the issue.