diagnostics

This commit is contained in:
Belal Elsabbagh
2026-02-04 07:56:25 +02:00
parent 4e83243ca1
commit 75471935c0
2 changed files with 13 additions and 3 deletions

View File

@@ -82,10 +82,20 @@ vim.lsp.config('*', {
capabilities = capabilities,
})
-- Diagnostic Config & Keymaps
-- See :help vim.diagnostic.Opts
vim.diagnostic.config {
virtual_lines = {
current_line = true,
},
update_in_insert = false,
severity_sort = true,
float = { border = 'rounded', source = 'if_many' },
underline = { severity = vim.diagnostic.severity.ERROR },
-- Can switch between these as you prefer
virtual_text = true, -- Text shows up at the end of the line
virtual_lines = false, -- Teest shows up underneath the line, with virtual lines
-- Auto open the float, so you can easily read the errors when jumping with `[d` and `]d`
jump = { float = true },
}
-- Brief aside: **What is LSP?**