From c8b96850c9e592fc1a3113ec4973588dec559556 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 May 2021 13:03:11 +0200 Subject: [PATCH] fix: try LspDiagnostics colors first before fallling back to Diff colors (#216) --- lua/lualine/components/diagnostics.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/lualine/components/diagnostics.lua b/lua/lualine/components/diagnostics.lua index 29686f5..abe4098 100644 --- a/lua/lualine/components/diagnostics.lua +++ b/lua/lualine/components/diagnostics.lua @@ -36,17 +36,20 @@ Diagnostics.new = function(self, options, child) -- apply colors if not new_diagnostics.options.color_error then new_diagnostics.options.color_error = - utils.extract_highlight_colors('DiffDelete', 'fg') or + utils.extract_highlight_colors('LspDiagnosticsDefaultError', 'fg') or + utils.extract_highlight_colors('DiffDelete', 'fg') or Diagnostics.default_colors.error end if not new_diagnostics.options.color_warn then new_diagnostics.options.color_warn = - utils.extract_highlight_colors('DiffText', 'fg') or + utils.extract_highlight_colors('LspDiagnosticsDefaultWarning', 'fg') or + utils.extract_highlight_colors('DiffText', 'fg') or Diagnostics.default_colors.warn end if not new_diagnostics.options.color_info then new_diagnostics.options.color_info = - utils.extract_highlight_colors('Normal', 'fg') or + utils.extract_highlight_colors('LspDiagnosticsDefaultInformation', 'fg') or + utils.extract_highlight_colors('Normal', 'fg') or Diagnostics.default_colors.info end