Files
quartz/content/10-19 LIFE/13 TECH SETUP/13.11 APPS/nvim.md
Quartz Syncer 125a9b1752
All checks were successful
Build and Deploy Quartz / build (push) Successful in 26s
Published multiple files
2026-02-05 09:53:27 -07:00

116 lines
2.3 KiB
Markdown

---
publish: true
permalink: /10-19 LIFE/13 TECH SETUP/13.11 APPS/nvim.md
title: nvim (Neovim)
created: 2026-01-30T08:08:10.433-07:00
modified: 2026-02-05T09:12:58.916-07:00
tags:
- editor
- terminal
- development
cssclasses: ""
---
Neovim is a hyperextensible Vim-based text editor. I use [LazyVim](http://www.lazyvim.org/) as a pre-configured distribution for a batteries-included experience.
## Installation
**Arch Linux:**
```bash
sudo pacman -S neovim
```
**Dependencies for full LazyVim experience:**
```bash
sudo pacman -S git lazygit ripgrep fd nodejs npm
```
## LazyVim Setup
LazyVim provides sensible defaults, plugin management, and a curated set of plugins.
**Backup existing config:**
```bash
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
```
**Install LazyVim:**
```bash
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvim
```
On 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`:
```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`:
```lua
vim.opt.relativenumber = true
vim.opt.wrap = true
vim.opt.tabstop = 4
```
## Resources
- LazyVim docs: http://www.lazyvim.org/
- Neovim docs: https://neovim.io/doc/
- `:Lazy` - Plugin manager UI
- `:Mason` - LSP/formatter installer