dotfiles/config/linux-dev/nvim/lua/config/options.lua

69 lines
2.4 KiB
Lua

-- Map Leader
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Disable features
vim.loader.enable()
vim.g.loaded_gzip = 1
vim.g.loaded_tar = 1
vim.g.loaded_tarPlugin = 1
vim.g.loaded_zip = 1
vim.g.loaded_zipPlugin = 1
vim.g.loaded_getscript = 1
vim.g.loaded_getscriptPlugin = 1
vim.g.loaded_vimball = 1
vim.g.loaded_vimballPlugin = 1
vim.g.loaded_matchit = 1
vim.g.loaded_2html_plugin = 1
vim.g.loaded_rrhelper = 1
vim.g.loaded_netrw = 1 -- use nvim-tree instead
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_matchparen = 1
-- UI
vim.g.have_nerd_font = true
vim.opt.termguicolors = true -- TrueColor
vim.opt.colorcolumn = '100' -- Vertical guide at column 100
vim.opt.signcolumn = 'no' -- Hide sign column
vim.opt.cursorline = true -- Highlight current line
vim.opt.guicursor = 'n-v-i-c:block' -- Block cursor shape
vim.opt.number = true -- Show absolute line numbers
vim.opt.relativenumber = true -- Show relative numbers
vim.opt.statusline = '%F%m%r%h%w%=%l,%c %P ' -- Custom statusline
vim.opt.wrap = false -- Line wrapping
vim.opt.linebreak = true -- Wrap long lines at convenient points
vim.opt.breakindent = true -- Preserve indent when wrapping long lines
-- Editing
vim.opt.shiftwidth = 2 -- Number of spaces to use for (auto)indent
vim.opt.tabstop = 2 -- Number of spaces that a <Tab> in file counts for
vim.opt.softtabstop = 2 -- Number of spaces when pressing <Tab> in insert mode
vim.opt.expandtab = true -- Use spaces instead of literal tab characters
vim.opt.autoindent = true -- Copy indent from the current line when starting a new one
vim.opt.smartindent = true -- Automatically inserts indents in code blocks (for C-like languages)
vim.opt.completeopt = { 'menuone' }
-- Scroll and mouse
vim.opt.scrolloff = 10 -- Keep lines visible above/below cursor
vim.opt.mousescroll = 'hor:1,ver:1' -- Scroll lines/columns
vim.opt.mouse = 'a' -- Enable mouse mode
-- Search
vim.opt.ignorecase = true -- Case-insensitive search
vim.opt.smartcase = true -- Smart-case search
vim.opt.inccommand = 'split' -- Live substitution preview
-- Splits
vim.opt.splitright = true -- Vertical splits to the right
vim.opt.splitbelow = true -- Horizontal splits below
-- Performance and persistence
vim.opt.undofile = true -- Save undo history
vim.opt.undodir = vim.fn.stdpath('state') .. '/undo'
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.writebackup = false
vim.opt.updatetime = 250 -- Faster updates
vim.opt.timeoutlen = 300 -- Shorter keymap timeout