Neovim Bootstrap
Up: Neovim Config Tutorial Down: options, platforms, plugins
The bootstrap is a doorbell, not a cathedral. init.lua rings the right rooms in order, then gets out of the way.
Load Order
The startup path is intentionally plain:
vim.loader.enable()
require("user-defaults")
require("utils.globals")
require("utils")
require("keymappings")
require("user-settings")
require("settings")
if not vim.g.vscode then
require("plugins")
end
require("autocommands")
require("colorscheme")
require("utils.after")The order matters. Defaults exist before personal settings override them. Helpers exist before plugins call them. Keymaps and base settings exist even if Lazy.nvim fails.
Special Front Doors
The config recognizes two nonstandard entry points:
| Mode | Behavior |
|---|---|
| VS Code Neovim | Skips the plugin suite so embedded Neovim stays light. |
| Neovide | Uses the same core but adds GUI font and scale settings. |
This keeps the core editor portable. The same configuration can run in a terminal, GUI, remote shell, or constrained host without pretending every environment is identical.
Lazy.nvim Bootstrapping
lua/plugins/init.lua installs Lazy.nvim if it is missing, prepends it to the runtime path, then imports plugin families:
require("lazy").setup({
{ import = "plugins.editor" },
{ import = "plugins.ui" },
{ import = "plugins.colorschemes" },
{ import = "plugins.lsp" },
{ import = "plugins.git" },
{ import = "plugins.treesitter" },
{ import = "plugins.completion" },
{ import = "plugins.tools" },
{ import = "plugins.lang" },
{ import = "plugins.notes" },
{ import = "plugins.debug" },
{ import = "plugins.ai" },
})That file is the switchboard. The plugin category files are the rooms.
NixOS LSP Enablement
After the normal load, NixOS gets one more explicit step. The config enables the language servers that should be available from the system or project shell:
if O.is_nixos then
vim.lsp.enable({
"nil_ls",
"nixd",
"lua_ls",
"basedpyright",
"ruff",
"eslint",
"jsonls",
"texlab",
"vtsls",
"vue_ls",
"yamlls",
})
endThis is the key Nix idea: do not ask Neovim to download tools into its own state. Ask the project shell to provide tools, then ask Neovim to use them.
Related: platforms, LSP architecture