bufferline.nvim
bufferline.nvim copied to clipboard
Announcements and Breaking Changes
Hi 👋🏾,
If you want to know ahead of time about any changes or breakage, please subscribe to this issue. Generally I will now do all development on the dev
branch which is unstable, so I have the freedom to try new things and develop quickly there without worrying about disrupting users workflows. This plugin will also use tags and semver, so users can pin their installations to the latest major version e.g. tag = 1.*
and only upgrade major version when they are ready to migrate.
I will announce anything of note on this thread, so users are aware in advance.
Version 2.0.0 which is due to be merged in a few days, will change the required neovim version to 0.7.0 so this plugin can benefit from all the api changes and remove the ~hacks~/workarounds for autocommands and user commands etc. that it has been using.
Any user wanting to stay on the pre 0.7.0 version of this plugin should use the v1.*
tag
e.g.
use {'akinsho/bufferline.nvim', tag = 'v1.*' }
option.indicator_icon
has been soft deprecated. For anyone overriding the indicator_icon
please update your config to
config = {
options = {
indicator = {
style = 'icon',
icon = '|',
}
}
}
This will eventually be removed in a month
All highlighting must now be done using the same arguments as are used for nvim_set_hl
i.e.
all gui*
attributes e.g. guifg
, guibg
etc. should now be changed as follows
guifg
→ foreground
guibg
→ background
gui=italic,bold,underline
→ {italic = true, underline = true, bold = true}
Please see :help nvim_set_hl
for more details.
This removes an old piece of legacy code that was manually translating user gui attributes into the correct format once this plugin migrated to nvim_set_hl
This translation is scheduled for removal in 1 month as well.
I've now automated releasing bufferline versions so will be removing the dev
branch eventually and no longer pushing to it. All development will now be on main
and if people want stability they should stick with the tags which I've now setup to be autogenerated on version bumps
I'v deprecated show_buffer_default_icon
this field is only necessary for users who do not want to show a default icon bufferline includes a default icon for files without an icon by default. Any users who want to turn of the default can use the new get_element_icon
field and use nvim-web-devicons
themselves with their own preferences e.g.
options = {
get_element_icon = function(element)
return require('bufferline').get_element_icon(element.name, {default = true})
end
}
I've also changed the group.matcher
argument to pass in less private/internal data
e.g.
options = {
groups = {
options = { toggle_hidden_on_enter = true },
items = {
{
name = 'Dependencies',
icon = '',
matcher = function(buf) -- buf here is now only a subset of the full buffer object
return vim.startswith(buf.path, vim.env.VIMRUNTIME)
end,
},
}
This should not affect most people only anyone using one of the more obscure fields. If that was you please open an issue. If it's a very private field then we'll discuss if there's a way to replicate it and if not maybe it worth re-adding.
Removed the old gui{fg,bg}
translation layer, a lot later than the promised 1 month 👉🏿 https://github.com/akinsho/bufferline.nvim/issues/387#issuecomment-1226035817. Whilst not technically a breaking change as the earlier deprecation was marked as breaking. Just mentioning here for visibility. Using one of these values has long been validated against in the users config so hopefully people have all migrated off of this.