The Options File

The Options File

Highlights from a real lua/config/options.lua, grouped the way the file is:

UI

vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.signcolumn = "yes"      -- permanent sign column: the gutter never jumps
vim.opt.scrolloff = 8           -- keep context around the cursor
vim.opt.laststatus = 3          -- one global statusline
vim.opt.winborder = "rounded"   -- rounded borders on every float
vim.opt.shiftwidth = 2
vim.opt.shiftround = true       -- indents land on clean multiples
vim.opt.breakindent = true      -- wrapped lines stay aligned
vim.opt.ignorecase = true
vim.opt.smartcase = true        -- lowercase matches all; capitals are exact

Persistence — the one that matters

vim.opt.undofile = true

Every change is written to disk. Close the editor, come back days later, and u still walks backwards through history.

Behaviour

vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.splitkeep = "screen"    -- text stays put when windows open and close
vim.opt.foldmethod = "expr"     -- folding powered by the syntax tree

The complete, commented file is nvim/lua/config/options.lua in the course repo — 97 lines, every one explained.