Skip to content

Commit

Permalink
docs: consistent nerdfonts spacing
Browse files Browse the repository at this point in the history
Nerdfont icons should be have a single space after them to make sure
they won't overlap with text after them.
  • Loading branch information
gepbird committed Jul 18, 2024
1 parent 351763c commit dc2f70e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and ""
or (e == "warning" and "" or "" )
or (e == "warning" and "" or " ")
s = s .. n .. sym
end
return s
Expand Down
16 changes: 8 additions & 8 deletions doc/bufferline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ The available configuration are:
style = 'icon' | 'underline' | 'none',
},
buffer_close_icon = '󰅖',
modified_icon = '●',
close_icon = '',
left_trunc_marker = '',
right_trunc_marker = '',
modified_icon = '● ',
close_icon = ' ',
left_trunc_marker = ' ',
right_trunc_marker = ' ',
--- name_formatter can be used to change the buffer's label in the bufferline.
--- Please note some names can/will break the
--- bufferline so use this at your discretion knowing that it has
Expand Down Expand Up @@ -316,7 +316,7 @@ a custom function in your setup.
--- this should return a string
--- Don't get too fancy as this function will be executed a lot
diagnostics_indicator = function(count, level)
local icon = level:match("error") and " " or ""
local icon = level:match("error") and " " or " "
return " " .. icon .. count
end
<
Expand All @@ -337,7 +337,7 @@ current buffer and only have them appear for other buffers.
return ''
end

return ''
return ' '
end
<

Expand All @@ -361,7 +361,7 @@ In order to group buffers specify a list of groups in your config e.g.
name = "Tests", -- Mandatory
highlight = {underline = true, sp = "blue"}, -- Optional
priority = 2, -- determines where it will appear relative to other groups (Optional)
icon = "", -- Optional
icon = " ", -- Optional
matcher = function(buf) -- Mandatory
return buf.filename:match('%_test') or buf.filename:match('%_spec')
end,
Expand Down Expand Up @@ -439,7 +439,7 @@ to other groups e.g.
options = {
groups = {
items = {
require('bufferline.groups').builtin.pinned:with({ icon = "󰐃" })
require('bufferline.groups').builtin.pinned:with({ icon = "󰐃 " })
... -- other items
}
}
Expand Down

0 comments on commit dc2f70e

Please # to comment.