Skip to content

Commit

Permalink
fix!: convert codepoints from nerdfonts v2 to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus authored and Bekaboo committed May 30, 2023
1 parent d6a5e2c commit 03f6e86
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ https://github.com/Bekaboo/dropbar.nvim/assets/76579810/e8c1ac26-0321-4762-9975-
kinds = {
use_devicons = true,
symbols = {
Array = ' ',
Array = '󰅪 ',
Boolean = '',
BreakStatement = '󰙧 ',
Call = '󰃷 ',
CaseStatement = '󱃙 ',
Class = '',
Color = ' ',
Constant = ' ',
Color = '󰏘 ',
Constant = '󰏿 ',
Constructor = '',
ContinueStatement = '',
Copilot = '',
Expand All @@ -210,7 +210,7 @@ https://github.com/Bekaboo/dropbar.nvim/assets/76579810/e8c1ac26-0321-4762-9975-
IfStatement = '󰇉 ',
Interface = '',
Keyword = '󰌋 ',
List = ' ',
List = '󰅪 ',
Log = '󰦪 ',
Lsp = '',
Macro = '󰁌 ',
Expand All @@ -220,30 +220,30 @@ https://github.com/Bekaboo/dropbar.nvim/assets/76579810/e8c1ac26-0321-4762-9975-
MarkdownH4 = '󰉮 ',
MarkdownH5 = '󰉯 ',
MarkdownH6 = '󰉰 ',
Method = ' ',
Method = '󰆧 ',
Module = '󰏗 ',
Namespace = ' ',
Namespace = '󰅩 ',
Null = '󰢤 ',
Number = ' ',
Object = ' ',
Operator = ' ',
Number = '󰎠 ',
Object = '󰅩 ',
Operator = '󰆕 ',
Package = '󰆦 ',
Property = '',
Reference = '󰦾 ',
Regex = '',
Repeat = '󰑖 ',
Scope = ' ',
Scope = '󰅩 ',
Snippet = '󰩫 ',
Specifier = '󰦪 ',
Statement = ' ',
Statement = '󰅩 ',
String = '󰉾 ',
Struct = '',
SwitchStatement = '󰺟 ',
Text = '',
Type = '',
TypeParameter = ' ',
TypeParameter = '󰆩 ',
Unit = '',
Value = ' ',
Value = '󰎠 ',
Variable = '󰀫 ',
WhileStatement = '󰑖 ',
},
Expand Down Expand Up @@ -517,14 +517,14 @@ used by the plugin:
- Default:
```lua
{
Array = ' ',
Array = '󰅪 ',
Boolean = '',
BreakStatement = '󰙧 ',
Call = '󰃷 ',
CaseStatement = '󱃙 ',
Class = '',
Color = ' ',
Constant = ' ',
Color = '󰏘 ',
Constant = '󰏿 ',
Constructor = '',
ContinueStatement = '',
Copilot = '',
Expand All @@ -543,7 +543,7 @@ used by the plugin:
IfStatement = '󰇉 ',
Interface = '',
Keyword = '󰌋 ',
List = ' ',
List = '󰅪 ',
Log = '󰦪 ',
Lsp = '',
Macro = '󰁌 ',
Expand All @@ -553,31 +553,31 @@ used by the plugin:
MarkdownH4 = '󰉮 ',
MarkdownH5 = '󰉯 ',
MarkdownH6 = '󰉰 ',
Method = ' ',
Method = '󰆧 ',
Module = '󰏗 ',
Namespace = ' ',
Namespace = '󰅩 ',
Null = '󰢤 ',
Number = ' ',
Object = ' ',
Operator = ' ',
Number = '󰎠 ',
Object = '󰅩 ',
Operator = '󰆕 ',
Package = '󰆦 ',
Property = '',
Reference = '󰦾 ',
Regex = '',
Repeat = '󰑖 ',
Scope = ' ',
Scope = '󰅩 ',
Snippet = '󰩫 ',
Specifier = '󰦪 ',
Statement = ' ',
Statement = '󰅩 ',
String = '󰉾 ',
Struct = '',
SwitchStatement = '󰺟 ',
Terminal = '',
Text = '',
Type = '',
TypeParameter = ' ',
TypeParameter = '󰆩 ',
Unit = '',
Value = ' ',
Value = '󰎠 ',
Variable = '󰀫 ',
WhileStatement = '󰑖 ',
}
Expand Down
26 changes: 13 additions & 13 deletions doc/dropbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ by the plugin:
- Default: >lua

{
Array = ' ',
Array = '󰅪 ',
Boolean = ' ',
BreakStatement = '󰙧 ',
Call = '󰃷 ',
CaseStatement = '󱃙 ',
Class = ' ',
Color = ' ',
Constant = ' ',
Color = '󰏘 ',
Constant = '󰏿 ',
Constructor = ' ',
ContinueStatement = '→ ',
Copilot = ' ',
Expand All @@ -222,7 +222,7 @@ by the plugin:
IfStatement = '󰇉 ',
Interface = ' ',
Keyword = '󰌋 ',
List = ' ',
List = '󰅪 ',
Log = '󰦪 ',
Lsp = ' ',
Macro = '󰁌 ',
Expand All @@ -232,31 +232,31 @@ by the plugin:
MarkdownH4 = '󰉮 ',
MarkdownH5 = '󰉯 ',
MarkdownH6 = '󰉰 ',
Method = ' ',
Method = '󰆧 ',
Module = '󰏗 ',
Namespace = ' ',
Namespace = '󰅩 ',
Null = '󰢤 ',
Number = ' ',
Object = ' ',
Operator = ' ',
Number = '󰎠 ',
Object = '󰅩 ',
Operator = '󰆕 ',
Package = '󰆦 ',
Property = ' ',
Reference = '󰦾 ',
Regex = ' ',
Repeat = '󰑖 ',
Scope = ' ',
Scope = '󰅩 ',
Snippet = '󰩫 ',
Specifier = '󰦪 ',
Statement = ' ',
Statement = '󰅩 ',
String = '󰉾 ',
Struct = ' ',
SwitchStatement = '󰺟 ',
Terminal = ' ',
Text = ' ',
Type = ' ',
TypeParameter = ' ',
TypeParameter = '󰆩 ',
Unit = ' ',
Value = ' ',
Value = '󰎠 ',
Variable = '󰀫 ',
WhileStatement = '󰑖 ',
}
Expand Down
26 changes: 13 additions & 13 deletions lua/dropbar/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ M.opts = {
kinds = {
use_devicons = true,
symbols = {
Array = ' ',
Array = '󰅪 ',
Boolean = '',
BreakStatement = '󰙧 ',
Call = '󰃷 ',
CaseStatement = '󱃙 ',
Class = '',
Color = ' ',
Constant = ' ',
Color = '󰏘 ',
Constant = '󰏿 ',
Constructor = '',
ContinueStatement = '',
Copilot = '',
Expand All @@ -52,7 +52,7 @@ M.opts = {
IfStatement = '󰇉 ',
Interface = '',
Keyword = '󰌋 ',
List = ' ',
List = '󰅪 ',
Log = '󰦪 ',
Lsp = '',
Macro = '󰁌 ',
Expand All @@ -62,30 +62,30 @@ M.opts = {
MarkdownH4 = '󰉮 ',
MarkdownH5 = '󰉯 ',
MarkdownH6 = '󰉰 ',
Method = ' ',
Method = '󰆧 ',
Module = '󰏗 ',
Namespace = ' ',
Namespace = '󰅩 ',
Null = '󰢤 ',
Number = ' ',
Object = ' ',
Operator = ' ',
Number = '󰎠 ',
Object = '󰅩 ',
Operator = '󰆕 ',
Package = '󰆦 ',
Property = '',
Reference = '󰦾 ',
Regex = '',
Repeat = '󰑖 ',
Scope = ' ',
Scope = '󰅩 ',
Snippet = '󰩫 ',
Specifier = '󰦪 ',
Statement = ' ',
Statement = '󰅩 ',
String = '󰉾 ',
Struct = '',
SwitchStatement = '󰺟 ',
Text = '',
Type = '',
TypeParameter = ' ',
TypeParameter = '󰆩 ',
Unit = '',
Value = ' ',
Value = '󰎠 ',
Variable = '󰀫 ',
WhileStatement = '󰑖 ',
},
Expand Down
20 changes: 10 additions & 10 deletions tests/bar_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local source = {
return {
bar.dropbar_symbol_t:new(),
bar.dropbar_symbol_t:new({
icon = ' ',
icon = '󰅩 ',
name = 'testing',
icon_hl = 'DropBarIconTest',
name_hl = 'DropBarNameTest',
Expand Down Expand Up @@ -85,9 +85,9 @@ describe('[bar]', function()
assert.are.same(2, #winbar.components)
end)
it('concatenates and converts to string', function()
local plain_str = ' | testing '
local plain_str = ' | 󰅩 testing '
local formatted_str = string.format(
'%%#DropBar#%%* | %%@v:lua.dropbar.on_click_callbacks.buf%d.win%d.fn%d@%%#DropBarIconTest# %%*%%#DropBarNameTest#testing%%*%%X%%#DropBar# %%*',
'%%#DropBar#%%* | %%@v:lua.dropbar.on_click_callbacks.buf%d.win%d.fn%d@%%#DropBarIconTest#󰅩 %%*%%#DropBarNameTest#testing%%*%%X%%#DropBar# %%*',
winbar.buf,
winbar.win,
winbar.components[2].bar_idx
Expand All @@ -98,15 +98,15 @@ describe('[bar]', function()
end)
it('calculates display width', function()
assert.are.same(
vim.fn.strdisplaywidth(' | testing '),
vim.fn.strdisplaywidth(' | 󰅩 testing '),
winbar:displaywidth()
)
end)
it('truncates itself', function()
vim.cmd.vsplit()
vim.api.nvim_win_set_width(winbar.win, 10)
winbar:truncate()
assert.are.same(' | t... ', winbar:cat(true))
assert.are.same(' | 󰅩 t... ', winbar:cat(true))
vim.api.nvim_win_close(vim.api.nvim_get_current_win(), true)
end)
it('sets and restores pick mode correctly', function()
Expand Down Expand Up @@ -156,7 +156,7 @@ describe('[bar]', function()
local symbol = winbar.components[2]
it('creates new instances', function()
assert.are.same('testing', symbol.name)
assert.are.same(' ', symbol.icon)
assert.are.same('󰅩 ', symbol.icon)
assert.are.same('DropBarNameTest', symbol.name_hl)
assert.are.same('DropBarIconTest', symbol.icon_hl)
symbol:on_click()
Expand All @@ -168,10 +168,10 @@ describe('[bar]', function()
assert.spy(agent).was_called()
end)
it('concatenates', function()
assert.are.same(' testing', symbol:cat(true))
assert.are.same('󰅩 testing', symbol:cat(true))
assert.are.same(
string.format(
'%%@v:lua.dropbar.on_click_callbacks.buf%d.win%d.fn%d@%%#DropBarIconTest# %%*%%#DropBarNameTest#testing%%*%%X',
'%%@v:lua.dropbar.on_click_callbacks.buf%d.win%d.fn%d@%%#DropBarIconTest#󰅩 %%*%%#DropBarNameTest#testing%%*%%X',
symbol.bar.buf,
symbol.bar.win,
symbol.bar_idx
Expand All @@ -181,12 +181,12 @@ describe('[bar]', function()
end)
it('calculates display width', function()
assert.are.same(
vim.fn.strdisplaywidth(' testing'),
vim.fn.strdisplaywidth('󰅩 testing'),
symbol:displaywidth()
)
end)
it('calculates byte width', function()
assert.are.same(#' testing', symbol:bytewidth())
assert.are.same(#'󰅩 testing', symbol:bytewidth())
end)
it(
'goes to the start of the range of the associated symbol tree node',
Expand Down

0 comments on commit 03f6e86

Please sign in to comment.