diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 8732177..b22ad0c 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -60,4 +60,4 @@ See [#24](https://github.com/shadmansaleh/lualine.nvim/pull/24) for details - color_added, color_modified, color_removed are now available as added, modified, removed in diff_color table option - color_error, color_warning, color_info, color_hint are now available -as error, warning, info, hint in diagnostics_color table option +as error, warn, info, hint in diagnostics_color table option diff --git a/README.md b/README.md index b9f7c78..cbf5222 100644 --- a/README.md +++ b/README.md @@ -368,7 +368,7 @@ sections = { -- table of diagnostic sources, available sources: -- 'nvim_lsp', 'coc', 'ale', 'vim_lsp' -- Or a function that returns a table like - -- {error=error_cnt, warning=warn_cnt, info=info_cnt, hint=hint_cnt} + -- {error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt} sources = {}, -- displays diagnostics from defined severity sections = {'error', 'warn', 'info', 'hint'}, diff --git a/doc/lualine.txt b/doc/lualine.txt index 1dda805..e4c1f15 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -351,7 +351,7 @@ Component specific local options ~ -- table of diagnostic sources, available sources: -- 'nvim_lsp', 'coc', 'ale', 'vim_lsp' -- Or a function that returns a table like - -- {error=error_cnt, warning=warn_cnt, info=info_cnt, hint=hint_cnt} + -- {error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt} sources = {}, -- displays diagnostics from defined severity sections = {'error', 'warn', 'info', 'hint'}, diff --git a/lua/lualine/components/diagnostics.lua b/lua/lualine/components/diagnostics.lua index e1394bc..f6197fb 100644 --- a/lua/lualine/components/diagnostics.lua +++ b/lua/lualine/components/diagnostics.lua @@ -51,7 +51,7 @@ local default_options = { update_in_insert = false, sources = nil, sections = { 'error', 'warn', 'info', 'hint' }, - diagnostic_color = { + diagnostics_color = { error = { fg = modules.utils.extract_highlight_colors('LspDiagnosticsDefaultError', 'fg') or modules.utils.extract_highlight_colors('DiffDelete', 'fg') @@ -60,7 +60,7 @@ local default_options = { warn = { fg = modules.utils.extract_highlight_colors('LspDiagnosticsDefaultWarning', 'fg') or modules.utils.extract_highlight_colors('DiffText', 'fg') - or '#ffdf00', + or '#ffa500', }, info = { fg = modules.utils.extract_highlight_colors('LspDiagnosticsDefaultInformation', 'fg') @@ -70,7 +70,7 @@ local default_options = { hint = { fg = modules.utils.extract_highlight_colors('LspDiagnosticsDefaultHint', 'fg') or modules.utils.extract_highlight_colors('DiffChange', 'fg') - or '#d7afaf', + or '#273faf', }, }, } @@ -91,22 +91,22 @@ Diagnostics.new = function(self, options, child) if new_diagnostics.options.colored then new_diagnostics.highlight_groups = { error = modules.highlight.create_component_highlight_group( - new_diagnostics.options.diagnostic_color.error, + new_diagnostics.options.diagnostics_color.error, 'diagnostics_error', new_diagnostics.options ), warn = modules.highlight.create_component_highlight_group( - new_diagnostics.options.diagnostic_color.warn, + new_diagnostics.options.diagnostics_color.warn, 'diagnostics_warn', new_diagnostics.options ), info = modules.highlight.create_component_highlight_group( - new_diagnostics.options.diagnostic_color.info, + new_diagnostics.options.diagnostics_color.info, 'diagnostics_info', new_diagnostics.options ), hint = modules.highlight.create_component_highlight_group( - new_diagnostics.options.diagnostic_color.hint, + new_diagnostics.options.diagnostics_color.hint, 'diagnostics_hint', new_diagnostics.options ), @@ -209,9 +209,9 @@ Diagnostics.get_diagnostics = function(sources) source_result = type(source_result) == 'table' and source_result or {} result[index] = { error = source_result.error or 0, - warn = source_result.warning or 0, + warn = source_result.warn or 0, info = source_result.info or 0, - hint = source_result.hin or 0, + hint = source_result.hint or 0, } end end