dotfiles/nvim/lua/options.lua
Mats Ricardo Nomedal a11473e308 initial dotfiles
2026-04-23 23:48:01 +02:00

41 lines
1 KiB
Lua

local opt = vim.opt
-- Line numbers
opt.number = true
opt.relativenumber = true
opt.cursorline = true
opt.signcolumn = "yes" -- always show (prevents layout shifting with LSP)
-- Indentation (spaces, 2-wide by default; LSP/treesitter adjusts per language)
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.smartindent = true
-- Search
opt.ignorecase = true
opt.smartcase = true -- case-sensitive when query has uppercase
opt.hlsearch = true
-- System clipboard — y/p work with Ctrl+C/Ctrl+V from other apps
opt.clipboard = "unnamedplus"
-- Splits open in natural directions
opt.splitbelow = true
opt.splitright = true
-- Appearance
opt.termguicolors = true
opt.wrap = false
opt.scrolloff = 8 -- keep 8 lines visible above/below cursor
-- Files & undo
opt.swapfile = false
opt.undofile = true -- persistent undo across sessions
-- Performance
opt.updatetime = 250 -- faster CursorHold (used by LSP hover)
opt.timeoutlen = 300 -- faster which-key popup
-- Mouse support
opt.mouse = "a"