This is my personal Neovim configuration. It has been built around the mini.nvim plugin---an amazing set of 40+ modules carefully crafted to balance features versus implementation complexity.1
Note
This configuration is designed for Neovim nightly.
Key concepts:
-
Each plugin has its own configuration module under
lua/plugins/. This makes it easy to navigate to a specific plugin's configuration via a file picker. It also results in smaller files that are easier to read and maintain. -
Load order is controlled by an explicit manifest (
lua/config/init.lua): an ordered list ofrequires, split into three tiers. This replaces my old scheme of using numeric filename prefixes inplugin/directories---ordering is now stated in one place instead of encoded in filenames. -
The three tiers: now (essential for first paint, runs synchronously at startup), now_if_args (runs synchronously when files/directories are opened directly, e.g.
nvim file.txt, deferred otherwise), and later (deferred until after startup, order-free). Plugin modules pick their tier withloader.now/loader.now_if_args/loader.laterfromlua/config/loader.lua, which build onMiniMisc.safely(). -
Most mappings are defined in
lua/config/keymaps.luaso it's easy to see what mappings have been used and what's still available. Plugin-specific entry points (pickers, toggles, ...) are exported from their plugin module and invoked lazily from the keymaps. -
Plugins are managed natively by the new builtin 'vim.pack' plugin manager, which is scheduled for inclusion in Neovim 0.12+.
Below is an overview of the directory structure:
.
├── after # Sourced last (`:h after-directory`)
│ ├── ftplugin/ # Configurations for filetypes
│ └── syntax/ # Syntax tweaks (orgagenda)
├── colors/ # Personal color schemes
├── indent/ # Indent rules (fennel)
├── init.lua # Entry point: bootstraps mini, loads config
├── lsp/ # LSP configurations
├── lua
│ ├── config # Foundations, loaded first
│ │ ├── options.lua # General options
│ │ ├── autocmds.lua # General autocommands
│ │ ├── functions.lua # Custom functions
│ │ ├── keymaps.lua # Key mappings
│ │ └── loader.lua # now/later deferred-loading helpers
│ └── plugins/ # One module per plugin (mini and otherwise)
├── nvim-pack-lock.json # Lockfile for `vim.pack`
└── snippets/ # Snippets for various filetypes