main
59c7d64 ยท 8 days ago 139 commits
 1vim.g.mapleader = " "
 2
 3vim.diagnostic.config({
 4  virtual_text = {
 5    prefix = "",
 6    spacing = 2,
 7  },
 8  signs = true,
 9  underline = true,
10  severity_sort = true,
11  float = {
12    border = "rounded",
13    source = "always",
14  },
15})
16
17
18local opt = vim.opt
19
20-- ============================================
21-- INTERFACE & APPEARANCE
22-- ============================================
23opt.number = true                    -- Show line numbers
24opt.cursorline = true                -- Highlight current line
25opt.signcolumn = "yes"               -- Always show sign column (git, diagnostics)
26opt.ruler = false                    -- Hide ruler (statusline shows this)
27opt.showmode = false                 -- Hide mode indicator (statusline shows this)
28opt.laststatus = 3                   -- Global statusline
29opt.termguicolors = true             -- Enable 24-bit RGB colors
30opt.pumblend = 10                    -- Popup menu transparency (10%)
31opt.pumheight = 10                   -- Maximum popup menu height
32opt.conceallevel = 2                 -- Conceal text with replacements (markdown, etc.)
33opt.shortmess:append("I")            -- Don't show intro message
34
35-- ============================================
36-- INDENTATION & FORMATTING
37-- ============================================
38opt.shiftwidth = 2                   -- Indent width (2 spaces)
39opt.tabstop = 2                      -- Tab width (2 spaces)
40opt.shiftround = true                -- Round indent to multiple of shiftwidth
41opt.smartindent = true               -- Smart auto-indenting
42opt.formatexpr = ""
43opt.formatoptions = "jcroqlnt"       -- Auto-formatting options
44
45-- ============================================
46-- SEARCH & NAVIGATION
47-- ============================================
48opt.ignorecase = true                -- Case-insensitive search...
49opt.smartcase = true                 -- ...unless uppercase is used
50opt.inccommand = "nosplit"           -- Live preview of :s substitutions
51opt.grepformat = "%f:%l:%c:%m"       -- Grep output format
52opt.grepprg = "rg --vimgrep"         -- Use ripgrep for :grep
53
54-- ============================================
55-- SCROLLING & DISPLAY
56-- ============================================
57opt.scrolloff = 4                    -- Keep 4 lines above/below cursor
58opt.sidescrolloff = 8                -- Keep 8 columns left/right of cursor
59opt.wrap = false                      -- Wrap long lines
60
61-- ============================================
62-- SPLITS & WINDOWS
63-- ============================================
64opt.splitbelow = true                -- Horizontal splits open below
65opt.splitright = true                -- Vertical splits open right
66
67-- ============================================
68-- FILES & PERSISTENCE
69-- ============================================
70opt.undofile = true                  -- Persistent undo across sessions
71opt.undolevels = 10000               -- Maximum undo history
72
73-- ============================================
74-- INPUT & INTERACTION
75-- ============================================
76opt.mouse = "a"                      -- Enable mouse support
77opt.confirm = true                   -- Ask for confirmation instead of failing
78opt.clipboard:append("unnamedplus")  -- Use system clipboard
79
80-- ============================================
81-- PERFORMANCE
82-- ============================================
83opt.updatetime = 200                 -- Faster CursorHold events (ms)
84opt.timeoutlen = 500                 -- Key sequence timeout (ms)
85
86-- ============================================
87-- FOLDING
88-- ============================================
89opt.foldenable = true
90opt.foldmethod = 'expr'
91opt.foldexpr='v:lua.vim.treesitter.foldexpr()'
92
93opt.foldlevel = 99                   -- Start with all folds open
94
95-- ============================================
96-- TERMINAL INTEGRATION
97-- ============================================
98opt.title = true                     -- Set terminal title
99opt.titlestring = "%{expand('%:t')}" -- Title = current filename