chore: simplify

This commit is contained in:
Job Jobse committed 2026-10-12 20:15:01 +02:00
1 parent c7768913da
commit e5aa95f71d
7 files changed
+49 -137

No files matched your search

+30 -35
View File
@@ -1,45 +1,41 @@
-- General
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
vim.o.undofile = true -- Enable persistent undo
vim.o.shada = "'50,<20,s10,:100,/50,@50,h" -- Limit ShaDa file (for startup)
vim.g.mapleader = ' ' -- Use <Space> as <Leader> key
vim.o.undofile = true -- Keep undo history after closing files
vim.o.shada = "'50,<20,s10,:100,/50,@50,h,r/tmp/" -- Fewer saved items (faster startup), skip /tmp files
-- UI
vim.o.breakindent = true -- Indent wrapped lines to match line start
vim.o.breakindentopt = 'list:-1' -- Add padding for lists (if 'wrap' is set)
vim.o.cursorline = true -- Enable current line highlighting
vim.o.linebreak = true -- Wrap lines at 'breakat' (if 'wrap' is set)
vim.o.list = true -- Show helpful text indicators
vim.o.listchars = 'tab:→ ,trail:·,nbsp:␣' -- Characters for list mode
vim.o.number = true -- Show line numbers
vim.o.pumheight = 10 -- Make popup menu smaller
vim.o.pummaxwidth = 80 -- Make popup menu not too wide
vim.o.shortmess = 'CFOSWacou' -- Disable some built-in completion messages
vim.o.signcolumn = 'yes' -- Always show signcolumn (less flicker)
vim.o.splitbelow = true -- Horizontal splits will be below
vim.o.splitkeep = 'screen' -- Reduce scroll during window split
vim.o.splitright = true -- Vertical splits will be to the right
vim.o.wrap = false -- Don't visually wrap lines
vim.o.winborder = 'rounded' -- Use border in floating windows
vim.o.pumborder = 'rounded' -- Use border in popup menu
vim.o.cmdheight = 0 -- Hide the command line when not in use
vim.cmd('syntax off') -- Disable legacy syntax highlighting
require('vim._core.ui2').enable({ -- Enable new ui (requires nightly)
vim.o.number = true -- Show line numbers
vim.o.cursorline = true -- Highlight the line the cursor is on
vim.o.signcolumn = 'yes' -- Always show sign column (no text shifting)
vim.o.wrap = false -- Don't wrap long lines
vim.o.list = true -- Show tabs, trailing spaces and nbsp
vim.o.listchars = 'tab:→ ,trail:·,nbsp:␣' -- Symbols used for those characters
vim.o.fillchars = 'eob: ' -- Hide `~` on lines after end of buffer
vim.o.splitbelow = true -- Open horizontal splits below
vim.o.splitright = true -- Open vertical splits to the right
vim.o.splitkeep = 'screen' -- Keep text in place when opening splits
vim.o.cmdheight = 0 -- Hide command line when not typing a command
vim.o.shortmess = 'CFOSWacou' -- Hide completion, search count, undo and write messages
vim.cmd.syntax('off') -- Disable legacy syntax (treesitter handles highlighting)
require('vim._core.ui2').enable({ -- New message/cmdline UI, messages in float (nightly)
msg = { targets = 'msg' }
})
-- Editing
vim.o.expandtab = true -- Convert tabs to spaces
vim.o.formatoptions = 'rqnl1j' -- Improve comment editing
vim.o.ignorecase = true -- Ignore case during search
vim.o.infercase = true -- Infer case in built-in completion
vim.o.shiftwidth = 2 -- Use this number of spaces for indentation
vim.o.smartcase = true -- Respect case if search pattern has upper case
vim.o.spelloptions = 'camel' -- Treat camelCase word parts as separate words
vim.o.tabstop = 2 -- Show tab as this number of spaces
vim.o.virtualedit = 'block' -- Allow going past end of line in blockwise mode
vim.o.expandtab = true -- Insert spaces when pressing <Tab>
vim.o.shiftwidth = 2 -- Spaces per indent level (>>, <<, autoindent)
vim.o.tabstop = 2 -- Display width of a tab character
vim.o.ignorecase = true -- Ignore case when searching
vim.o.smartcase = true -- ...unless the pattern contains uppercase
vim.o.virtualedit = 'block' -- Allow cursor past end of line in visual block
vim.o.spelloptions = 'camel' -- Spell-check camelCase words per part
vim.o.complete = '.,w,b,kspell' -- Use less sources
vim.o.completeopt = 'menuone,noselect,fuzzy' -- Use custom behavior
-- Completion
vim.o.autocomplete = true -- Show completion popup while typing
vim.o.complete = '.,w,b,kspell' -- Complete from buffer, windows, buffers, spell
vim.o.completeopt = 'menuone,noselect,fuzzy,popup' -- Show menu for one match, don't preselect, fuzzy match, description popup
vim.o.pumheight = 10 -- Max items visible in completion popup
vim.o.pummaxwidth = 120 -- Max width of completion popup
-- Autocommands
Config.autocmd('TextYankPost', '*', function() vim.hl.hl_op() end, 'Highlight yanked text')
@@ -59,6 +55,5 @@ Config.later(function()
[vim.diagnostic.severity.INFO] = '',
},
},
virtual_text = false,
})
end)