43 lines
1.7 KiB
Lua
43 lines
1.7 KiB
Lua
local g = vim.g
|
|
local o = vim.opt
|
|
|
|
-- Leaders
|
|
g.mapleader = " " -- Uses space as the global leader key.
|
|
g.maplocalleader = " " -- Uses space as the local leader key.
|
|
|
|
-- Layout and display
|
|
o.number = true -- Shows absolute line numbers.
|
|
o.relativenumber = true -- Shows relative numbers for easier motion.
|
|
o.cursorline = true -- Highlights the line under the cursor.
|
|
o.textwidth = 80 -- Wraps inserted text after 80 columns when formatting is active.
|
|
o.scrolloff = 8 -- Keeps context lines visible around the cursor.
|
|
o.signcolumn = "yes" -- Always reserves space for signs in the gutter.
|
|
o.colorcolumn = "+1" -- Highlights the preferred maximum line width.
|
|
o.wrap = false -- Prevents long lines from wrapping on screen.
|
|
o.list = true -- Displays whitespace characters using listchars.
|
|
o.listchars = {
|
|
tab = "» ",
|
|
trail = "·",
|
|
extends = "⟩",
|
|
precedes = "⟨",
|
|
nbsp = "␣",
|
|
} -- Defines how invisible characters are rendered.
|
|
o.termguicolors = true -- Enables full RGB color support.
|
|
o.mouse = "" -- Disables mouse support.
|
|
|
|
-- Indentation and editing
|
|
o.tabstop = 4 -- Renders tab characters as four columns.
|
|
o.softtabstop = 4 -- Makes tab/backspace feel like four spaces.
|
|
o.shiftwidth = 4 -- Uses four columns for each indent step.
|
|
o.expandtab = true -- Inserts spaces when indenting by default.
|
|
o.smartindent = true -- Adds indentation automatically on new lines.
|
|
o.swapfile = false -- Disables swapfile creation.
|
|
|
|
-- Search and update behavior
|
|
o.incsearch = true -- Updates search matches as you type.
|
|
o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events.
|
|
o.spelllang = { "en_us" } -- Uses US English for spell checking.
|
|
|
|
-- Shell
|
|
o.shell = "bash" -- Runs shell commands through bash.
|