Files
nvim/lua/config/options.lua
Morten Olsen b3b70bceeb Improved flow
2026-01-26 23:04:14 +01:00

45 lines
1.2 KiB
Lua

-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- Scrolling: Keep cursor centered
vim.opt.scrolloff = 999
-- Line numbers: Use relative numbers for easier navigation
vim.opt.relativenumber = true
-- Text wrapping: Don't wrap lines (useful for code)
vim.opt.wrap = false
-- Indentation: 2 spaces (common for TS/JS, adjustable per project via .editorconfig)
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.smartindent = true
-- Search: Smart case sensitivity
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Undo: Persistent undo across sessions
vim.opt.undofile = true
vim.opt.undolevels = 10000
-- Splits: Open new splits in intuitive directions
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Completion: Better completion experience
vim.opt.completeopt = "menu,menuone,noselect"
-- Performance: Faster updates
vim.opt.updatetime = 200
vim.opt.timeoutlen = 300
-- Visual: Show invisible characters
vim.opt.list = true
vim.opt.listchars = { tab = " ", trail = "·", nbsp = "" }
-- Clipboard: Use system clipboard
vim.opt.clipboard = "unnamedplus"