fix: try LspDiagnostics colors first before fallling back to Diff colors (#216)
This commit is contained in:
parent
5c20f5f4b8
commit
c8b96850c9
|
@ -36,17 +36,20 @@ Diagnostics.new = function(self, options, child)
|
||||||
-- apply colors
|
-- apply colors
|
||||||
if not new_diagnostics.options.color_error then
|
if not new_diagnostics.options.color_error then
|
||||||
new_diagnostics.options.color_error =
|
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
|
Diagnostics.default_colors.error
|
||||||
end
|
end
|
||||||
if not new_diagnostics.options.color_warn then
|
if not new_diagnostics.options.color_warn then
|
||||||
new_diagnostics.options.color_warn =
|
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
|
Diagnostics.default_colors.warn
|
||||||
end
|
end
|
||||||
if not new_diagnostics.options.color_info then
|
if not new_diagnostics.options.color_info then
|
||||||
new_diagnostics.options.color_info =
|
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
|
Diagnostics.default_colors.info
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue