Title here
Summary here
Neovim loads init.vim or init.lua, never both. Move the old file
aside and start clean:
mv ~/.config/nvim/init.vim ~/.config/nvim/init.vim.bakEvery set option becomes vim.opt.option = value:
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.termguicolors = true
vim.opt.cursorline = true
vim.opt.scrolloff = 8
vim.g.mapleader = " "
vim.cmd("colorscheme hackertheme")
vim.keymap.set("n", "<leader>e", vim.cmd.Ex, {desc="File explorer"})
vim.opt.clipboard = "unnamedplus"Three patterns cover almost everything:
set number → vim.opt.number = true; paired settings like
tabstop=4 shiftwidth=4 become two assignments.vim.g.mapleader must run before any mapping is
defined, because mappings capture the leader at definition time.vim.cmd("...") — the colorscheme line is the classic example.The desc field on keymaps is worth the habit early: it is what which-key
and :map display later, making your config self-documenting.
This exact file is available as a checkpoint in the
course repo under
stages/12-lua-config/.