require('vim._core.ui2').enable() vim.opt.fileformats = "dos,unix,mac" -- Set leader key before loading plugins vim.g.mapleader = " " vim.g.maplocalleader = " " -- Line Numbers vim.opt.number = true -- Show line numbers vim.opt.relativenumber = true -- Show relative line numbers for faster navigation -- Confirm & Unsaved Changes vim.opt.confirm = true -- Confirm to save changes before exiting modified buffer (instead of throwing an error) -- Indentation & Tabs vim.opt.tabstop = 4 -- Number of spaces that a counts for vim.opt.shiftwidth = 4 -- Number of spaces to use for each step of (auto)indent vim.opt.expandtab = true -- Convert tabs to spaces vim.opt.smartindent = true -- Auto-indent new lines intelligently -- Search Settings vim.opt.ignorecase = true -- Case-insensitive search... vim.opt.smartcase = true -- ...unless \C or uppercase letters are used vim.opt.hlsearch = true -- Highlight all matches on previous search vim.opt.incsearch = true -- Show search matches as you type -- UI & Editor Layout vim.opt.termguicolors = true -- Enable 24-bit RGB colors in the TUI vim.opt.cursorline = true -- Highlight the current line vim.opt.signcolumn = "yes" -- Always show signcolumn (prevents text shift on LSP/Git diagnostics) vim.opt.scrolloff = 8 -- Keep 8 lines visible above/below cursor when scrolling vim.opt.wrap = false -- Disable line wrapping vim.opt.splitright = true -- Vertical splits open to the right vim.opt.splitbelow = true -- Horizontal splits open below -- Clipboard & Files vim.opt.clipboard = "unnamedplus" -- Sync clipboard between OS and Neovim vim.opt.undofile = true -- Enable persistent undo history across sessions vim.opt.updatetime = 250 -- Faster completion / CursorHold event trigger (default 4000ms) vim.opt.timeoutlen = 300 -- Time to wait for mapped sequence to complete (in milliseconds) -- Enable persistent undo vim.opt.undofile = true -- Define the undo directory path local undodir = vim.fn.expand(vim.fn.stdpath("data") .. "/undo") -- Create the directory if it doesn't exist (important for Windows) -- if vim.fn.isdirectory(undodir) == 0 then -- vim.fn.mkdir(undodir, "p") -- end vim.opt.undodir = undodir