2021-10-11 09:21:38 +00:00
|
|
|
local require = require('lualine_require').require
|
|
|
|
local utils = require 'lualine.utils.utils'
|
|
|
|
local M = {}
|
|
|
|
|
2021-10-12 14:04:47 +00:00
|
|
|
-- default symbols for diagnostics component
|
2021-10-11 09:21:38 +00:00
|
|
|
M.symbols = {
|
|
|
|
icons = {
|
|
|
|
error = ' ', -- xf659
|
|
|
|
warn = ' ', -- xf529
|
|
|
|
info = ' ', -- xf7fc
|
2021-11-09 04:03:03 +00:00
|
|
|
hint = ' ', -- xf835
|
2021-10-11 09:21:38 +00:00
|
|
|
},
|
|
|
|
no_icons = { error = 'E:', warn = 'W:', info = 'I:', hint = 'H:' },
|
|
|
|
}
|
|
|
|
|
2021-10-12 14:04:47 +00:00
|
|
|
-- default options for diagnostics component
|
2021-10-11 09:21:38 +00:00
|
|
|
M.options = {
|
|
|
|
colored = true,
|
|
|
|
update_in_insert = false,
|
2021-10-21 11:55:35 +00:00
|
|
|
always_visible = false,
|
2021-10-11 09:21:38 +00:00
|
|
|
sources = { 'nvim_lsp', 'coc' },
|
|
|
|
sections = { 'error', 'warn', 'info', 'hint' },
|
|
|
|
diagnostics_color = {
|
|
|
|
error = {
|
|
|
|
fg = utils.extract_color_from_hllist(
|
|
|
|
'fg',
|
|
|
|
{ 'DiagnosticError', 'LspDiagnosticsDefaultError', 'DiffDelete' },
|
|
|
|
'#e32636'
|
|
|
|
),
|
|
|
|
},
|
|
|
|
warn = {
|
|
|
|
fg = utils.extract_color_from_hllist(
|
|
|
|
'fg',
|
|
|
|
{ 'DiagnosticWarn', 'LspDiagnosticsDefaultWarning', 'DiffText' },
|
|
|
|
'#ffa500'
|
|
|
|
),
|
|
|
|
},
|
|
|
|
info = {
|
|
|
|
fg = utils.extract_color_from_hllist(
|
|
|
|
'fg',
|
|
|
|
{ 'DiagnosticInfo', 'LspDiagnosticsDefaultInformation', 'Normal' },
|
|
|
|
'#ffffff'
|
|
|
|
),
|
|
|
|
},
|
|
|
|
hint = {
|
|
|
|
fg = utils.extract_color_from_hllist(
|
|
|
|
'fg',
|
|
|
|
{ 'DiagnosticHint', 'LspDiagnosticsDefaultHint', 'DiffChange' },
|
|
|
|
'#273faf'
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
return M
|