fix: try LspDiagnostics colors first before fallling back to Diff colors (#216)

This commit is contained in:
Folke Lemaitre 2021-05-07 13:03:11 +02:00 committed by GitHub
parent 5c20f5f4b8
commit c8b96850c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -36,16 +36,19 @@ 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('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('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('LspDiagnosticsDefaultInformation', 'fg') or
utils.extract_highlight_colors('Normal', 'fg') or
Diagnostics.default_colors.info
end