diff --git a/lua/autocmds.lua b/lua/autocmds.lua index 412149f..22a7129 100644 --- a/lua/autocmds.lua +++ b/lua/autocmds.lua @@ -76,5 +76,27 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +-- Phase 11.8: Colorize diagnostic severity in quickfix/location list +vim.api.nvim_create_autocmd("FileType", { + group = aug, + pattern = "qf", -- Applies to both quickfix and location list + callback = function() + -- Use matchadd() for higher priority highlighting + -- This will override the default qf syntax + vim.fn.matchadd('qfError', '\\', 10) + vim.fn.matchadd('qfWarning', '\\', 10) + vim.fn.matchadd('qfInfo', '\\', 10) + vim.fn.matchadd('qfHint', '\\', 10) + vim.fn.matchadd('qfNote', '\\', 10) + + -- Also match uppercase variants + vim.fn.matchadd('qfError', '\\', 10) + vim.fn.matchadd('qfWarning', '\\', 10) + vim.fn.matchadd('qfInfo', '\\', 10) + vim.fn.matchadd('qfHint', '\\', 10) + vim.fn.matchadd('qfNote', '\\', 10) + end, +}) + return {} diff --git a/lua/paper-tonic-modern/groups/editor.lua b/lua/paper-tonic-modern/groups/editor.lua index 9ffb844..4f8c817 100644 --- a/lua/paper-tonic-modern/groups/editor.lua +++ b/lua/paper-tonic-modern/groups/editor.lua @@ -118,11 +118,19 @@ return { Conceal = 'Noise', -- ============================================================================ - -- QuickFix + -- QuickFix & Location List -- ============================================================================ QuickFixLine = { bg = c.bg_hl_special_weak, bold = true }, + -- Diagnostic severity highlighting in quickfix/location list + -- These are custom syntax groups defined in autocmds.lua + qfError = { fg = c.diag_error, bold = true }, -- "error:" or "[E]" + qfWarning = { fg = c.diag_warn, bold = true }, -- "warning:" or "[W]" + qfInfo = { fg = c.diag_info, bold = true }, -- "info:" or "[I]" + qfHint = { fg = c.diag_hint, bold = true }, -- "hint:" or "[H]" + qfNote = { fg = c.diag_hint, bold = true }, -- "note:" (same as hint) + -- ============================================================================ -- Debug -- ============================================================================