mirror of
https://github.com/He4eT/dotfiles.git
synced 2026-05-04 23:47:23 +00:00
nvim: simplify diagnostic icons
This commit is contained in:
parent
05ecb0d2f7
commit
374e6102e1
1 changed files with 8 additions and 10 deletions
|
|
@ -502,20 +502,18 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- Diagnostic Appearance
|
-- Diagnostic Appearance
|
||||||
|
|
||||||
local diagnostic_icon = '⏹'
|
local icon = '⏹'
|
||||||
local diagnostic_types = { 'Error', 'Warn', 'Hint', 'Info' }
|
|
||||||
|
|
||||||
local diagnostic_signs = {}
|
|
||||||
for type in pairs(diagnostic_types) do
|
|
||||||
diagnostic_signs[vim.diagnostic.severity[type]] = diagnostic_icon
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.diagnostic.config {
|
vim.diagnostic.config {
|
||||||
signs = {
|
signs = {
|
||||||
text = diagnostic_signs,
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = icon,
|
||||||
|
[vim.diagnostic.severity.WARN] = icon,
|
||||||
|
[vim.diagnostic.severity.HINT] = icon,
|
||||||
|
[vim.diagnostic.severity.INFO] = icon,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
prefix = diagnostic_icon,
|
prefix = icon,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue