deprecated function
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user