deprecated function

This commit is contained in:
2025-03-26 21:06:48 +01:00
parent 9c904b2f84
commit 028ca26b08
2 changed files with 29 additions and 23 deletions

View File

@ -109,14 +109,36 @@ opt.foldexpr = 'nvim_treesitter#foldexpr()'
opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.diagnostic.config({
virtual_text = false,
signs = true,
float = {
border = 'single',
format = function(diagnostic)
return string.format('%s (%s) [%s]', diagnostic.message, diagnostic.source, diagnostic.code or diagnostic.user_data.lsp.code)
end,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '', -- Nerd Font Error Icon
[vim.diagnostic.severity.WARN] = '', -- Nerd Font Warning Icon
[vim.diagnostic.severity.INFO] = '', -- Nerd Font Info Icon
[vim.diagnostic.severity.HINT] = '', -- Nerd Font Hint Icon (example)
},
-- Define the highlight group to use for the sign text for each severity
texthl = {
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
},
-- Optional: Highlight the line number column
numhl = {
[vim.diagnostic.severity.ERROR] = 'DiagnosticLineNrError',
-- Add others for WARN, INFO, HINT if desired
},
-- Optional: Highlight the whole line
linehl = {
-- Define highlight groups like 'DiagnosticLineError', 'DiagnosticLineWarn', etc.
[vim.diagnostic.severity.ERROR] = 'DiagnosticLineError',
},
},
-- Other diagnostic configurations (optional examples)
virtual_text = false, -- Disable virtual text (inline messages)
underline = true, -- Enable underlining diagnostics
update_in_insert = false, -- Don't update diagnostics in insert mode
severity_sort = true, -- Sort diagnostics by severity
})
-- Window border for floating windows