refactor: simplify

This commit is contained in:
2026-09-03 20:28:34 +02:00
parent 71434f947b
commit 82fe66dfb0
8 changed files with 147 additions and 206 deletions
+16 -16
View File
@@ -1,7 +1,7 @@
-- General =====================================================================
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
vim.o.undofile = true -- Enable persistent undo
vim.o.shada = "'100,<50,s10,:1000,/100,@100,h" -- Limit ShaDa file (for startup)
vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
vim.o.undofile = true -- Enable persistent undo
vim.o.shada = "'100,<50,s10,:1000,/100,@100,h" -- Limit ShaDa file (for startup)
-- UI ==========================================================================
vim.o.breakindent = true -- Indent wrapped lines to match line start
@@ -27,16 +27,16 @@ require("vim._core.ui2").enable({ -- Enable new ui (requires nightly)
})
-- 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.opt.autoread = true -- Do not prompt to reread files on update
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.opt.autoread = true -- Do not prompt to reread files on update
-- Built-in completion
vim.o.complete = '.,w,b,kspell' -- Use less sources
@@ -52,7 +52,7 @@ Config.later(function()
vim.diagnostic.config({
signs = {
priority = 9999,
severity = { min = 'WARN', max = 'ERROR' },
severity = { min = vim.diagnostic.severity.WARN, max = vim.diagnostic.severity.ERROR },
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
@@ -60,11 +60,11 @@ Config.later(function()
[vim.diagnostic.severity.HINT] = '',
},
},
underline = { severity = { min = 'HINT', max = 'ERROR' } },
underline = { severity = { min = vim.diagnostic.severity.HINT, max = vim.diagnostic.severity.ERROR } },
virtual_lines = false,
virtual_text = {
current_line = true,
severity = { min = 'ERROR', max = 'ERROR' },
severity = { min = vim.diagnostic.severity.ERROR, max = vim.diagnostic.severity.ERROR },
},
update_in_insert = false,
})