Neovim is a hyperextensible Vim-based text editor. I use LazyVim as a pre-configured distribution for a batteries-included experience.
Installation
Arch Linux:
sudo pacman -S neovimDependencies for full LazyVim experience:
sudo pacman -S git lazygit ripgrep fd nodejs npmLazyVim Setup
LazyVim provides sensible defaults, plugin management, and a curated set of plugins.
Backup existing config:
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bakInstall LazyVim:
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvimOn first launch, LazyVim will install all plugins automatically.
Key Bindings (LazyVim defaults)
General
| Key | Action |
|---|---|
Space | Leader key |
Space Space | Find files |
Space / | Live grep |
Space e | File explorer |
Space gg | LazyGit |
Buffers
| Key | Action |
|---|---|
Space bd | Delete buffer |
H / L | Prev/next buffer |
Space bb | Switch buffer |
Windows
| Key | Action |
|---|---|
Ctrl+h/j/k/l | Navigate windows |
Space w- | Split horizontal |
Space w| | Split vertical |
Code
| Key | Action |
|---|---|
gd | Go to definition |
gr | Find references |
K | Hover documentation |
Space ca | Code action |
Space cf | Format |
Configuration
LazyVim config lives in ~/.config/nvim/lua/:
Add plugins
~/.config/nvim/lua/plugins/custom.lua:
return {
-- Add plugins here
{ "tpope/vim-surround" },
-- Override existing plugin config
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = { "lua", "python", "typescript" },
},
},
}Options
~/.config/nvim/lua/config/options.lua:
vim.opt.relativenumber = true
vim.opt.wrap = true
vim.opt.tabstop = 4Resources
- LazyVim docs: http://www.lazyvim.org/
- Neovim docs: https://neovim.io/doc/
:Lazy- Plugin manager UI:Mason- LSP/formatter installer