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 neovim

Dependencies for full LazyVim experience:

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:

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak

Install LazyVim:

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

KeyAction
SpaceLeader key
Space SpaceFind files
Space /Live grep
Space eFile explorer
Space ggLazyGit

Buffers

KeyAction
Space bdDelete buffer
H / LPrev/next buffer
Space bbSwitch buffer

Windows

KeyAction
Ctrl+h/j/k/lNavigate windows
Space w-Split horizontal
Space w|Split vertical

Code

KeyAction
gdGo to definition
grFind references
KHover documentation
Space caCode action
Space cfFormat

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 = 4

Resources