Skip to main content

Plugin Installation Failures

Lazy.nvim Bootstrap Error

If Lazy.nvim fails to bootstrap on first launch:
Ensure you have git installed and accessible from your command line.
Solution:
  1. Verify git is installed:
    git --version
    
  2. If missing, install git for your platform
  3. Remove the lazy.nvim directory and restart Neovim:
    rm -rf ~/.local/share/nvim/lazy/lazy.nvim
    nvim
    
Lazy.nvim is bootstrapped in lua/magictt/lazy.lua:1-11 and will automatically clone on first run.

Plugin Installation Hangs

If plugin installation freezes:
  1. Open Lazy panel: <Space>ln
  2. Press X to clear finished tasks
  3. Press U to update/retry failed plugins
  4. Check the log output for specific errors
The configuration auto-checks for plugin updates on startup but doesn’t notify to avoid noise (configured in lua/magictt/lazy.lua:15-18).

LSP Not Working

LSP Server Not Attaching

Diagnostic Commands:
:LspInfo
This shows which LSP servers are attached to the current buffer. Common Causes:
  1. Server not installed:
    • Open Mason: <Space>mm
    • Check if the required server is installed (✓)
    • If not, press i on the server to install it
  2. Wrong file type:
    • Verify file type: :set filetype?
    • Ensure it matches a configured LSP server
  3. LSP crashed:
    • Restart LSP: <Space>rs
    • Check messages: :messages
The configuration ensures installation of: ts_ls, html, cssls, tailwindcss, svelte, lua_ls, graphql, emmet_ls, prismals, pyright, and eslint (see lua/magictt/plugins/lsp/mason.lua:6-18).

LSP Keybindings Not Working

LSP keybindings only work when an LSP server is attached to the buffer. Verify:
  1. Run :LspInfo to confirm server is attached
  2. Check if the file type is supported
  3. Ensure you’re in Normal mode (not Insert mode)
Available LSP keybindings (see lua/magictt/lsp.lua:9-51):
  • gR - Show references (Telescope)
  • gD - Go to declaration
  • gd - Show definition
  • gi - Show implementations
  • gt - Show type definitions
  • <Space>ca - Code actions
  • <Space>rn - Rename symbol
  • <Space>d - Show line diagnostics
  • [d / ]d - Navigate diagnostics
  • K - Show documentation

Diagnostics Not Showing

Diagnostics are configured with custom signs and virtual text. Check configuration:
:lua vim.print(vim.diagnostic.config())
Manual diagnostic trigger:
:lua vim.diagnostic.show()
Diagnostic signs are configured in lua/magictt/lsp.lua:57-68 with custom icons for errors, warnings, hints, and info.

Treesitter Parsing Errors

Parser Installation Failed

Check installed parsers:
:TSInstallInfo
Manually install a parser:
:TSInstall <language>
For example: :TSInstall typescript
The configuration auto-installs parsers for: json, javascript, typescript, tsx, jsx, yaml, html, css, prisma, markdown, svelte, graphql, bash, lua, vim, dockerfile, gitignore, c, and astro (see lua/magictt/plugins/treesitter.lua:13-36).

Syntax Highlighting Broken

Update all parsers:
:TSUpdate
Check Treesitter status:
:checkhealth nvim-treesitter
Restart Treesitter for current buffer:
:write | edit
Or manually start:
:lua vim.treesitter.start()

C Compiler Not Found

Treesitter requires a C compiler to build parsers.
Install a C compiler for your platform:
  • macOS: xcode-select --install
  • Linux: sudo apt install build-essential (Debian/Ubuntu) or sudo yum groupinstall "Development Tools" (RHEL/Fedora)
  • Windows: Install MinGW or use WSL

Mason Installation Issues

Tools Fail to Install

Open Mason UI:
:Mason
Or use the keybinding: <Space>mm Check installation logs:
  1. In Mason UI, navigate to a tool
  2. Press g? to see help and keybindings
  3. Press l on a tool to view installation logs
Common issues:
  1. Missing dependencies:
    • Node.js/npm for JavaScript tools
    • Python/pip for Python tools
    • Go for Go-based tools
  2. Network issues:
    • Check internet connection
    • Try installing manually from terminal
  3. Permission errors:
    • Ensure write permissions to ~/.local/share/nvim/mason/
The configuration uses mason-tool-installer to automatically ensure installation of: prettier, stylua, isort, black, pylint, and eslint_d (see lua/magictt/plugins/lsp/mason.lua:39-46).

Mason UI Not Opening

Verify Mason is installed:
:Lazy
Look for mason.nvim in the plugin list. Force reinstall:
  1. Open Lazy: <Space>ln
  2. Find mason.nvim
  3. Press X to clean
  4. Press I to reinstall

Keybinding Conflicts

Custom Keybindings Not Working

The leader key is set to <Space> (see lua/magictt/core/keymaps.lua:2). Check if keybinding exists:
:nmap <Space>mm
This shows what the keybinding is mapped to. List all keybindings with leader:
:nmap <Space>

Plugin Keybindings Conflict

Some plugins may override core keybindings. Check which plugin owns a keybinding:
:verbose nmap <key>
This shows where the keybinding was last defined.

Telescope Keybindings Not Working

Telescope keybindings are defined in lua/magictt/plugins/telescope.lua:29-36:
  • <Space>ff - Find files
  • <Space>fr - Recent files
  • <Space>fs - Live grep (search string)
  • <Space>fc - Grep string under cursor
  • <Space>ft - Find todos
Ensure Telescope is loaded: :Telescope

Performance Issues

Slow Startup Time

Check startup time:
nvim --startuptime startup.log
Review startup.log to identify slow plugins. Lazy loading is enabled for most plugins. The Treesitter plugin is set to lazy = false (see lua/magictt/plugins/treesitter.lua:3) because it’s essential for syntax highlighting.

Sluggish LSP Performance

Large files: LSP may be slow on very large files. Disable LSP for current buffer:
:LspStop
Restart LSP:
:LspRestart
Or use: <Space>rs

High Memory Usage

Check memory usage:
:lua print(vim.api.nvim_get_vvar('progname'))
Reduce memory:
  1. Close unused buffers: :bufdo bd (careful!)
  2. Restart Neovim
  3. Disable auto-session if enabled

File Explorer Issues

Nvim-tree Not Opening

Keybindings (see lua/magictt/plugins/nvim-tree.lua:48-54):
  • <Space>ee - Toggle file explorer
  • <Space>ef - Toggle on current file
  • <Space>ec - Collapse file explorer
  • <Space>er - Refresh file explorer
Manual open:
:NvimTreeToggle

Netrw Conflicts

Netrw is disabled in favor of nvim-tree (see lua/magictt/plugins/nvim-tree.lua:8-9).
If netrw still appears, ensure the configuration is loaded properly:
:lua print(vim.g.loaded_netrw)
Should return 1.

Auto-format Issues

Format on Save Not Working

Auto-format is configured for JavaScript and TypeScript files only (see lua/magictt/plugins/lsp/lsp.lua:19-24). Manual format:
:lua vim.lsp.buf.format({ async = true })
Check if LSP supports formatting:
:lua print(vim.tbl_count(vim.lsp.get_active_clients({bufnr = 0, method = 'textDocument/formatting'})))
Should return > 0 if a formatter is available.

Formatter Not Installed

Ensure formatters are installed via Mason:
  • Prettier - JavaScript/TypeScript/HTML/CSS/etc.
  • Stylua - Lua
  • Black - Python
  • isort - Python imports
Check in Mason UI (<Space>mm) or install manually:
:MasonInstall prettier stylua black isort

Getting More Help

Health Check

Run a comprehensive health check:
:checkhealth
This checks Neovim configuration, plugins, and external dependencies.

Check Logs

View Neovim logs:
:messages
View LSP logs:
:lua vim.cmd('e ' .. vim.lsp.get_log_path())

Version Information

:version
Or check Neovim version:
nvim --version

Build docs developers (and LLMs) love