local g = vim.g local o = vim.opt g.mapleader = " " -- Uses space as the global leader key. g.maplocalleader = " " -- Uses space as the local leader key. g.clipboard = "osc52" -- Routes the + and * registers through OSC52 in terminal Neovim. 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.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. 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. o.incsearch = true -- Updates search matches as you type. o.completeopt = { "menuone", "noselect", "fuzzy", "nosort" } -- Enables fuzzy completion matching. o.pumheight = 8 -- Limits the completion popup menu size. o.updatetime = 50 -- Reduces idle delay for swap and CursorHold events. o.spelllang = { "en_us" } -- Uses US English for spell checking. o.shell = "bash" -- Runs shell commands through bash. -- Only show the invisible characters inside the code editing buffers vim.cmd([[autocmd BufWinEnter * if &buftype != '' | setlocal nolist | endif]])