Skip to content

Commit

Permalink
fix: ensure compatibility with Nerd Fonts v3 (#523)
Browse files Browse the repository at this point in the history
See-also: de37647
  • Loading branch information
Iron-E authored Aug 25, 2023
1 parent 8cca17e commit 352c09f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ require'barbar'.setup {
-- Valid options to display the buffer index and -number are `true`, 'superscript' and 'subscript'
buffer_index = false,
buffer_number = false,
button = '',
button = '',
-- Enables / disables diagnostic symbols
diagnostics = {
[vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
Expand Down
8 changes: 4 additions & 4 deletions doc/barbar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ icons ~

*barbar-setup.icons.button*
icons.button ~
`false | string` (default: `''`)
`false | string` (default: `''`)
The button which is clicked to close / save a buffer, or indicate that
it is pinned. Use `false` to disable it.

Expand All @@ -262,7 +262,7 @@ icons ~

*barbar-setup.icons.diagnostics.icon*
icons.diagnostics.icon ~
`boolean` (defaults: `' '`, `'💡'`, `' '`, and `'⚠️ '`)
`boolean` (defaults: `' '`, `'󰌶 '`, `' '`, and `' '`)
The icon which accompanies the number of diagnostics.

Example that disables the error icon, but still shows the count: >
Expand Down Expand Up @@ -327,7 +327,7 @@ icons ~
require'barbar'.setup {icons = {
buffer_index = false,
buffer_number = false,
button = '',
button = '',
diagnostics = {{enabled = true}, {enabled = true}},
filetype = {enabled = true},
separator = {left = '▎'},
Expand Down Expand Up @@ -366,7 +366,7 @@ icons ~
Example: >
require'barbar'.setup {icons = {
modified = {separator = '⋄'},
pinned = {button = '', filename = true},
pinned = {button = '', filename = true},
}}
<

Expand Down
10 changes: 5 additions & 5 deletions lua/barbar/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ local DEPRECATE_PREFIX = '\nThe barbar.nvim option '
--- @field [3] barbar.config.options.icons.diagnostics.severity
--- @field [4] barbar.config.options.icons.diagnostics.severity
local DEFAULT_DIAGNOSTIC_ICONS = {
[vim.diagnostic.severity.ERROR] = { enabled = false, icon = ' ' },
[vim.diagnostic.severity.HINT] = { enabled = false, icon = '💡' },
[vim.diagnostic.severity.INFO] = { enabled = false, icon = ' ' },
[vim.diagnostic.severity.WARN] = { enabled = false, icon = '⚠️ ' },
[vim.diagnostic.severity.ERROR] = { enabled = false, icon = ' ' },
[vim.diagnostic.severity.HINT] = { enabled = false, icon = '󰌶 ' },
[vim.diagnostic.severity.INFO] = { enabled = false, icon = ' ' },
[vim.diagnostic.severity.WARN] = { enabled = false, icon = ' ' },
}

--- Deeply extend `icons` to include the `DEFAULT_DIAGNOSTIC_ICONS`
Expand Down Expand Up @@ -287,7 +287,7 @@ function config.setup(options)
local default_icons = {
buffer_index = false,
buffer_number = false,
button = '𝝬',
button = '',
diagnostics = {},
gitsigns = {
added = { enabled = false, icon = '+' },
Expand Down

0 comments on commit 352c09f

Please sign in to comment.