Skip to content

Commit f639f87

Browse files
authored
feat(lsp): correctly configure diagnostic-signs (#1280)
Signed-off-by: Jint-lzxy <[email protected]>
1 parent b74c753 commit f639f87

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lua/modules/configs/completion/lspsaga.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ return function()
1010
}
1111

1212
local function set_sidebar_icons()
13-
-- Set icons for sidebar.
14-
local diagnostic_icons = {
15-
Error = icons.diagnostics.Error_alt,
16-
Warn = icons.diagnostics.Warning_alt,
17-
Info = icons.diagnostics.Information_alt,
18-
Hint = icons.diagnostics.Hint_alt,
19-
}
20-
for type, icon in pairs(diagnostic_icons) do
21-
local hl = "DiagnosticSign" .. type
22-
vim.fn.sign_define(hl, { text = icon, texthl = hl })
23-
end
13+
-- Set icons for sidebar
14+
vim.diagnostic.config({
15+
signs = {
16+
text = {
17+
[vim.diagnostic.severity.ERROR] = icons.diagnostics.Error_alt,
18+
[vim.diagnostic.severity.WARN] = icons.diagnostics.Warning_alt,
19+
[vim.diagnostic.severity.INFO] = icons.diagnostics.Information_alt,
20+
[vim.diagnostic.severity.HINT] = icons.diagnostics.Hint_alt,
21+
},
22+
},
23+
})
2424
end
2525

2626
set_sidebar_icons()

0 commit comments

Comments
 (0)