Installation¶
Setting up Neovim with LazyVim from scratch.
Prerequisites¶
Ensure the following tools are installed:
# macOS
brew install neovim git curl
# Required for plugins
brew install ripgrep fd lazygit
# Optional but recommended
brew install node npm python3
Minimum Versions¶
- Neovim >= 0.9.0 (0.10+ recommended)
- Git >= 2.19.0
- A Nerd Font for icons (recommended)
Install a Nerd Font¶
Configure your terminal to use the Nerd Font.
Installing Neovim¶
macOS (Homebrew)¶
Linux (Ubuntu/Debian)¶
# Via apt (may not be latest)
sudo apt install neovim
# Via AppImage (latest)
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x nvim.appimage
sudo mv nvim.appimage /usr/local/bin/nvim
Verify Installation¶
Installing LazyVim¶
Backup Existing Configuration¶
# Required backup
mv ~/.config/nvim ~/.config/nvim.bak
# Optional: backup runtime data
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak
Clone LazyVim Starter¶
Remove Git History (Optional)¶
To start fresh without starter's git history:
First Launch¶
On first launch:
- lazy.nvim (plugin manager) bootstraps itself
- LazyVim plugins are installed
- Language servers are downloaded via Mason
This may take a few minutes. Press q to close any prompts and let it finish.
Post-Installation¶
Health Check¶
Run inside Neovim:
Address any warnings or errors shown.
Install Language Servers¶
Open Mason UI:
Navigate and install language servers for your languages.
Set Up Shell Alias¶
Add to ~/.bashrc or ~/.zshrc:
Updating¶
Update Plugins¶
Inside Neovim:
Or press S in the Lazy UI (:Lazy).
Update Neovim¶
Update LazyVim¶
LazyVim updates automatically with :Lazy sync. To check the version:
Uninstalling¶
Remove Configuration¶
Remove Runtime Data¶
Restore Backup¶
Directory Structure¶
After installation:
~/.config/nvim/
├── init.lua # Entry point
├── lazy-lock.json # Plugin version lockfile
├── lazyvim.json # LazyVim extras config
├── lua/
│ ├── config/
│ │ ├── autocmds.lua # Auto commands
│ │ ├── keymaps.lua # Custom keybindings
│ │ ├── lazy.lua # Plugin manager setup
│ │ └── options.lua # Editor options
│ └── plugins/
│ └── *.lua # Custom plugin specs
└── stylua.toml # Lua formatter config
Dotfiles Integration¶
To manage your Neovim config with dotfiles:
# Move config to dotfiles
mv ~/.config/nvim ~/dotfiles/config/nvim
# Create symlink
ln -s ~/dotfiles/config/nvim ~/.config/nvim
Or use a dotfiles manager like stow: