This repository contains a modular Neovim setup designed to be easy to read, edit, and extend.
- Install Neovim (latest stable recommended) and dependencies:
- git, make, unzip, ripgrep
- a clipboard tool for your platform (for example xclip on Linux)
- Place this repo at:
- Linux/macOS: ~/.config/nvim
- Windows: %LOCALAPPDATA%\nvim
- Launch Neovim:
nvim- Let lazy.nvim install plugins on first run.
- Use :Lazy to inspect plugin status.
.
├── init.lua
├── lua
│ ├── core
│ │ ├── init.lua
│ │ ├── globals.lua
│ │ ├── options.lua
│ │ ├── keymaps.lua
│ │ ├── autocmds.lua
│ │ └── lazy.lua
│ └── plugins
│ ├── core.lua
│ ├── autopairs.lua
│ ├── bufferline.lua
│ ├── gitsigns.lua
│ ├── harpoon.lua
│ ├── lualine.lua
│ ├── neo-tree.lua
│ ├── overseer.lua
│ ├── toggleterm.lua
│ └── transparent.lua
└── lazy-lock.json
- init.lua: one-line entrypoint that loads core
- lua/core/globals.lua: leader keys and global flags
- lua/core/options.lua: editor options
- lua/core/keymaps.lua: global keymaps
- lua/core/autocmds.lua: global autocmds
- lua/core/lazy.lua: lazy.nvim bootstrap and plugin import root
- lua/plugins/*.lua: plugin specs and plugin-specific config
Neovim startup for this config is:
- init.lua runs
- lua/core/init.lua runs
- core modules load in this order:
- globals
- options
- keymaps
- autocmds
- lazy
- lua/core/lazy.lua bootstraps lazy.nvim and imports lua/plugins/*
- lazy.nvim loads plugins based on each plugin spec trigger (event, keys, cmd, ft, lazy=false, etc.)
- Create a new file in lua/plugins, for example:
- lua/plugins/fugitive.lua
- Return a lazy.nvim plugin spec table.
- Add lazy-loading triggers when possible to keep startup fast.
- Restart Neovim or run :Lazy sync.
Example:
return {
{
'tpope/vim-fugitive',
cmd = { 'Git', 'Gdiffsplit' },
keys = {
{ '<leader>gg', '<cmd>Git<CR>', desc = 'Open Git' },
},
},
}Edit lua/core/options.lua.
Example:
vim.o.relativenumber = falseEdit lua/core/keymaps.lua.
Example:
vim.keymap.set('n', '<leader>w', '<cmd>w<CR>', { desc = 'Save file' })Edit that plugin file in lua/plugins.
Example:
- lua/plugins/harpoon.lua
- lua/plugins/toggleterm.lua
- Update all plugins: :Lazy update
- Sync lockfile state: :Lazy sync
- Clean removed plugins: :Lazy clean
Commit lazy-lock.json when plugin versions change so installs stay reproducible.
- Startup errors:
- run nvim --headless '+qa' in this repo
- Health checks:
- run :checkhealth inside Neovim
- Plugin issues:
- open :Lazy and inspect errors for the plugin
- This setup keeps behavior split by concern so changes are easy to find.
- Plugin files are intentionally separate to make future edits low-risk and reviewable.