commit e38769130bd3f8356f128967bbd7a0bc6f7ae33c
parent ea349f1b999162d64a17cfc8fffe9a1d73ffd4d6
Author: Chris Bracken <chris@bracken.jp>
Date: Sun, 25 Aug 2024 18:34:30 -0700
vim: use fancy icons for diagnostics
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua
@@ -36,3 +36,9 @@ vim.api.nvim_create_autocmd('FileType', {
-- Don't show warnings, errors, etc. by default.
vim.diagnostic.enable(false)
+
+-- Use fancy diagnostics icons.
+for type, icon in pairs({ Error = "✘", Warn = "▲", Hint = "⚑", Info = "»" }) do
+ local hl = "DiagnosticSign" .. type
+ vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
+end