56 lines
2.0 KiB
Lua
56 lines
2.0 KiB
Lua
-- Map Leader
|
|
vim.g.mapleader = ' '
|
|
vim.g.maplocalleader = ' '
|
|
vim.g.have_nerd_font = true
|
|
|
|
-- use nvim-tree instead
|
|
vim.g.loaded_netrw = 1
|
|
vim.g.loaded_netrwPlugin = 1
|
|
|
|
vim.opt.formatoptions:remove('o')
|
|
|
|
vim.opt.modeline = true
|
|
vim.opt.modelines = 5
|
|
|
|
-- UI and appearance
|
|
vim.opt.termguicolors = true -- Disable 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.swapfile = false
|
|
|
|
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 behavior
|
|
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)
|
|
|
|
-- Scroll
|
|
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 and substitution
|
|
vim.opt.ignorecase = true -- Case-insensitive search
|
|
vim.opt.smartcase = true -- Smart-case search
|
|
vim.opt.inccommand = 'split' -- Live substitution preview
|
|
|
|
-- Splits and windows
|
|
vim.opt.splitright = true -- Vertical splits to the right
|
|
vim.opt.splitbelow = true -- Horizontal splits below
|
|
|
|
-- Performance and persistence
|
|
vim.opt.undofile = false -- Save undo history
|
|
vim.opt.updatetime = 250 -- Faster updates
|
|
vim.opt.timeoutlen = 300 -- Shorter keymap timeout
|