Skip to content

Commit

Permalink
Always add a space after status_symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
maddiemort committed Mar 2, 2021
1 parent 925acda commit e79d2e4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lua/lsp-status/statusline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e79d2e4

Please sign in to comment.