diff --git a/lua/lsp-status/statusline.lua b/lua/lsp-status/statusline.lua index 68432df..ae8bff1 100644 --- a/lua/lsp-status/statusline.lua +++ b/lua/lsp-status/statusline.lua @@ -44,30 +44,21 @@ local function statusline_lsp(bufnr) local buf_diagnostics = diagnostics(bufnr) local buf_messages = messages() - local only_hint = true - local some_diagnostics = false local status_parts = {} if buf_diagnostics.errors and buf_diagnostics.errors > 0 then table.insert(status_parts, config.indicator_errors .. config.indicator_separator .. buf_diagnostics.errors) - only_hint = false - some_diagnostics = true end if buf_diagnostics.warnings and buf_diagnostics.warnings > 0 then table.insert(status_parts, config.indicator_warnings .. config.indicator_separator .. buf_diagnostics.warnings) - only_hint = false - some_diagnostics = true end if buf_diagnostics.info and buf_diagnostics.info > 0 then table.insert(status_parts, config.indicator_info .. config.indicator_separator .. buf_diagnostics.info) - only_hint = false - some_diagnostics = true end if buf_diagnostics.hints and buf_diagnostics.hints > 0 then table.insert(status_parts, config.indicator_hint .. config.indicator_separator .. buf_diagnostics.hints) - some_diagnostics = true end local msgs = {} @@ -108,7 +99,7 @@ local function statusline_lsp(bufnr) end local base_status = vim.trim(table.concat(status_parts, ' ') .. ' ' .. table.concat(msgs, ' ')) - local symbol = config.status_symbol .. ((some_diagnostics and only_hint) and '' or ' ') + local symbol = config.status_symbol .. ' ' if config.current_function then local current_function = vim.b.lsp_current_function if current_function and current_function ~= '' then