Skip to content

Commit 853bdea

Browse files
authored
make indicator-separator configurable (#29)
1 parent 8efcef1 commit 853bdea

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lua/lsp-status.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ local _config = {}
22
local default_config = {
33
kind_labels = {},
44
current_function = true,
5+
indicator_separator = ' ',
56
indicator_errors = '',
67
indicator_warnings = '',
78
indicator_info = '🛈',

lua/lsp-status/statusline.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ local function statusline_lsp()
2121
local some_diagnostics = false
2222
local status_parts = {}
2323
if buf_diagnostics.errors and buf_diagnostics.errors > 0 then
24-
table.insert(status_parts, config.indicator_errors .. ' ' .. buf_diagnostics.errors)
24+
table.insert(status_parts, config.indicator_errors .. config.indicator_separator .. buf_diagnostics.errors)
2525
only_hint = false
2626
some_diagnostics = true
2727
end
2828

2929
if buf_diagnostics.warnings and buf_diagnostics.warnings > 0 then
30-
table.insert(status_parts, config.indicator_warnings .. ' ' .. buf_diagnostics.warnings)
30+
table.insert(status_parts, config.indicator_warnings .. config.indicator_separator .. buf_diagnostics.warnings)
3131
only_hint = false
3232
some_diagnostics = true
3333
end
3434

3535
if buf_diagnostics.info and buf_diagnostics.info > 0 then
36-
table.insert(status_parts, config.indicator_info .. ' ' .. buf_diagnostics.info)
36+
table.insert(status_parts, config.indicator_info .. config.indicator_separator .. buf_diagnostics.info)
3737
only_hint = false
3838
some_diagnostics = true
3939
end
4040

4141
if buf_diagnostics.hints and buf_diagnostics.hints > 0 then
42-
table.insert(status_parts, config.indicator_hint .. ' ' .. buf_diagnostics.hints)
42+
table.insert(status_parts, config.indicator_hint .. config.indicator_separator .. buf_diagnostics.hints)
4343
some_diagnostics = true
4444
end
4545

0 commit comments

Comments
 (0)