copnfigure folding

This commit is contained in:
Ray Elliott 2025-12-07 23:20:15 +00:00
commit 0685135ccf
3 changed files with 89 additions and 2 deletions

View file

@ -41,3 +41,32 @@ vim.opt.tabstop = 4 -- Display tabs as 4 spaces
vim.opt.shiftwidth = 4 -- Indent by 4
vim.opt.softtabstop = 4 -- Backspace removes 4 spaces
vim.opt.expandtab = true -- Use spaces by default (overridden per-filetype)
-- LSP diagnostics configuration
vim.diagnostic.config({
virtual_text = {
spacing = 4,
prefix = '●',
-- Show severity (ERROR, WARN, INFO, HINT)
format = function(diagnostic)
return string.format("%s: %s", diagnostic.source or "", diagnostic.message)
end,
},
signs = true, -- Keep signs in signcolumn
underline = true, -- Underline problematic text
update_in_insert = false, -- Don't update diagnostics while typing
severity_sort = true, -- Sort by severity (errors first)
float = {
border = 'rounded',
source = 'always', -- Show diagnostic source
header = '',
prefix = '',
},
})
-- Diagnostic signs in signcolumn
local signs = { Error = "E", Warn = "W", Hint = "H", Info = "I" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end