Skip to content

Commit 0b2fd86

Browse files
authored
docs: nerdfonts symbols improvements (akinsho#945)
* docs: update nerdfonts symbols * docs: consistent nerdfonts spacing Nerdfont icons should be have a single space after them to make sure they won't overlap with text after them.
1 parent f98ede0 commit 0b2fd86

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ In order to customise the appearance of the diagnostic count you can pass a cust
175175
--- this should return a string
176176
--- Don't get too fancy as this function will be executed a lot
177177
diagnostics_indicator = function(count, level, diagnostics_dict, context)
178-
local icon = level:match("error") and " " or ""
178+
local icon = level:match("error") and " " or ""
179179
return " " .. icon .. count
180180
end
181181

@@ -194,7 +194,7 @@ diagnostics_indicator = function(count, level, diagnostics_dict, context)
194194
local s = " "
195195
for e, n in pairs(diagnostics_dict) do
196196
local sym = e == "error" and ""
197-
or (e == "warning" and "" or "" )
197+
or (e == "warning" and "" or "")
198198
s = s .. n .. sym
199199
end
200200
return s

doc/bufferline.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ The available configuration are:
8080
style = 'icon' | 'underline' | 'none',
8181
},
8282
buffer_close_icon = '󰅖',
83-
modified_icon = '●',
84-
close_icon = '',
85-
left_trunc_marker = '',
86-
right_trunc_marker = '',
83+
modified_icon = '● ',
84+
close_icon = ' ',
85+
left_trunc_marker = ' ',
86+
right_trunc_marker = ' ',
8787
--- name_formatter can be used to change the buffer's label in the bufferline.
8888
--- Please note some names can/will break the
8989
--- bufferline so use this at your discretion knowing that it has
@@ -316,7 +316,7 @@ a custom function in your setup.
316316
--- this should return a string
317317
--- Don't get too fancy as this function will be executed a lot
318318
diagnostics_indicator = function(count, level)
319-
local icon = level:match("error") and " " or ""
319+
local icon = level:match("error") and " " or " "
320320
return " " .. icon .. count
321321
end
322322
<
@@ -337,7 +337,7 @@ current buffer and only have them appear for other buffers.
337337
return ''
338338
end
339339

340-
return ''
340+
return ' '
341341
end
342342
<
343343

@@ -361,7 +361,7 @@ In order to group buffers specify a list of groups in your config e.g.
361361
name = "Tests", -- Mandatory
362362
highlight = {underline = true, sp = "blue"}, -- Optional
363363
priority = 2, -- determines where it will appear relative to other groups (Optional)
364-
icon = "", -- Optional
364+
icon = " ", -- Optional
365365
matcher = function(buf) -- Mandatory
366366
return buf.filename:match('%_test') or buf.filename:match('%_spec')
367367
end,
@@ -439,7 +439,7 @@ to other groups e.g.
439439
options = {
440440
groups = {
441441
items = {
442-
require('bufferline.groups').builtin.pinned:with({ icon = "" })
442+
require('bufferline.groups').builtin.pinned:with({ icon = "󰐃 " })
443443
... -- other items
444444
}
445445
}
@@ -1131,19 +1131,19 @@ to be shown in a list of tables. For example:
11311131
local hint = #vim.diagnostic.get(0, {severity = seve.HINT})
11321132

11331133
if error ~= 0 then
1134-
table.insert(result, {text = " " .. error, link = "DiagnosticError"})
1134+
table.insert(result, {text = " " .. error, link = "DiagnosticError"})
11351135
end
11361136

11371137
if warning ~= 0 then
1138-
table.insert(result, {text = " " .. warning, link = "DiagnosticWarn"})
1138+
table.insert(result, {text = " " .. warning, link = "DiagnosticWarn"})
11391139
end
11401140

11411141
if hint ~= 0 then
1142-
table.insert(result, {text = " " .. hint, link = "DiagnosticHint"})
1142+
table.insert(result, {text = " " .. hint, link = "DiagnosticHint"})
11431143
end
11441144

11451145
if info ~= 0 then
1146-
table.insert(result, {text = " " .. info, link = "DiagnosticInfo"})
1146+
table.insert(result, {text = " " .. info, link = "DiagnosticInfo"})
11471147
end
11481148
return result
11491149
end,

0 commit comments

Comments
 (0)