nvimConfig/lua/truss/set.lua

50 lines
1.4 KiB
Lua

-- VIM Options
-- Cursor
vim.opt.guicursor = "" -- Use Default Cursor
vim.opt.termguicolors = true -- Enable 24 bit true color in supported terminals
-- Line Numbering
vim.opt.nu = true -- Show absolute number for current line
vim.opt.relativenumber = true -- Relative number on other lines
-- Whitespace Display
vim.opt.list = true -- Show whitespace characters
vim.opt.listchars = { -- Characters to use for whitespace
space = '·',
tab = '>-',
eol = '$',
trail = '~',
extends = '>',
precedes = '<'
}
-- Indentation / Tabs
vim.opt.tabstop = 4 -- Visual width of a tab
vim.opt.softtabstop = 4 -- Insert mode tab size
vim.opt.shiftwidth = 4 -- Shift / autoindent size
vim.opt.expandtab = true -- Tabs to spaces
vim.opt.smartindent = true
-- Wrapping
vim.opt.wrap = false -- Disable line wrapping
-- Backup/Undo
vim.opt.swapfile = false -- No buffer swap files
vim.opt.backup = false -- No backups when saving
vim.opt.undofile = true -- Persistent undo history
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" -- Persistent undo save location
-- Search Behavior
vim.opt.hlsearch = false -- Highlight all search matches
vim.opt.incsearch = true -- Highlight matches as its being typed
-- UI Layout
vim.opt.scrolloff = 8 -- Context to keep visible while scrolling
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
-- Misc
vim.opt.updatetime = 50 -- Update time after typing
vim.opt.colorcolumn = "80" -- Display a column at this position