You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

71 lines
2.9 KiB

vim.g.mapleader = ' '
vim.opt.clipboard = 'unnamedplus'
-- Search Configuration
vim.opt.hlsearch = false -- Don't highlight search results after searching
vim.opt.incsearch = true -- Show search matches as you type
vim.opt.ignorecase = true -- Ignore case when searching
vim.opt.smartcase = true -- Override ignorecase if search contains uppercase letters
-- Mouse Configuration
vim.opt.mouse = 'nv' -- Enable mouse in normal and visual modes only
-- Text Formatting
vim.opt.linebreak = true -- Break lines at word boundaries when wrapping
vim.opt.smartindent = true -- Automatically indent new lines intelligently
-- File Management
vim.opt.swapfile = false -- Don't create swap files
vim.opt.backup = false -- Don't create backup files
vim.opt.undodir = vim.fn.expand('~/.cache/nvim/undodir') -- Directory for undo files
vim.opt.undofile = true -- Save undo history to file for persistence
-- Character Encoding
vim.opt.encoding = 'utf-8' -- Set file encoding to UTF-8
-- Line Numbers
vim.opt.number = true -- Show absolute line numbers
vim.opt.relativenumber = true -- Show relative line numbers (hybrid numbering)
-- Indentation and Tabs
vim.opt.tabstop = 4 -- Number of spaces a tab character represents
vim.opt.softtabstop = 4 -- Number of spaces to use when inserting/deleting tabs
vim.opt.expandtab = true -- Convert tabs to spaces
vim.opt.shiftwidth = 4 -- Number of spaces to use for each indentation level
vim.opt.smarttab = true -- Use shiftwidth for tabs at beginning of line
-- Scrolling and Display
vim.opt.scrolloff = 8 -- Keep 8 lines visible above/below cursor when scrolling
vim.opt.signcolumn = 'yes' -- Always show the sign column (for git, lsp, etc.)
-- File Name Handling
vim.opt.isfname:append('@-@') -- Include @ and - characters in file names
-- Completion Menu
vim.opt.pumheight = 10 -- Limit popup menu height to 10 items
-- Performance
vim.opt.updatetime = 50 -- Faster completion and CursorHold events (milliseconds)
-- Visual Guides
vim.opt.colorcolumn = "80" -- Show vertical line at column 80
vim.opt.cursorline = false -- Highlight the current line
-- Text Formatting Options
vim.opt.formatoptions = 'tqj' -- t: auto-wrap text, q: format comments, j: remove comment leader when joining lines
-- Window Splitting
vim.opt.splitbelow = true -- Open horizontal splits below current window
vim.opt.splitright = true -- Open vertical splits to the right of current window
-- Diff Mode
vim.opt.diffopt:append('vertical') -- Show diffs in vertical splits
-- Colors
vim.opt.termguicolors = true -- Enable 24-bit RGB colors in terminal
-- Command Line (Neovim 0.8+)
if vim.fn.has("nvim-0.8") == 1 then
vim.opt.cmdheight = 0 -- Hide command line when not in use (requires Neovim 0.8+)
end