Skip to content

Commit

Permalink
nvim(diagnostic): update diagnostic configs
Browse files Browse the repository at this point in the history
  • Loading branch information
gelocraft committed Jan 30, 2025
1 parent c49fb4c commit 5ba927d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions nvim/lua/config/diagnostics.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
-- Default DiagnosticSign
local signs =
{ Error = '󰅚 ', Warn = '󰀪 ', Hint = '󰌶 ', Info = '󰋽 ' }
for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl })
end

-- Diagnostic Config
vim.diagnostic.config {
signs = true,
severity_sort = true,
float = { border = 'rounded' },
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ',
[vim.diagnostic.severity.HINT] = '󰌶 ',
},
},
virtual_text = {
prefix = '',
source = 'if_many',
format = function(diagnostic)
local diagnostic_message = {
[vim.diagnostic.severity.ERROR] = '󰅚 ' .. diagnostic.message,
Expand Down

0 comments on commit 5ba927d

Please sign in to comment.