Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcements and Breaking Changes #387

Open
akinsho opened this issue Apr 20, 2022 · 7 comments
Open

Announcements and Breaking Changes #387

akinsho opened this issue Apr 20, 2022 · 7 comments

Comments

@akinsho
Copy link
Owner

akinsho commented Apr 20, 2022

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.

Repository owner locked as resolved and limited conversation to collaborators Apr 20, 2022
@akinsho akinsho pinned this issue Apr 20, 2022
@akinsho
Copy link
Owner Author

akinsho commented Apr 20, 2022

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.*' }

@akinsho
Copy link
Owner Author

akinsho commented Aug 24, 2022

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

@akinsho
Copy link
Owner Author

akinsho commented Aug 24, 2022

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
guifgforeground
guibgbackground
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.

@akinsho
Copy link
Owner Author

akinsho commented Apr 1, 2023

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

@akinsho
Copy link
Owner Author

akinsho commented Apr 21, 2023

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
}

@akinsho
Copy link
Owner Author

akinsho commented Apr 21, 2023

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.

@akinsho
Copy link
Owner Author

akinsho commented Apr 23, 2023

Removed the old gui{fg,bg} translation layer, a lot later than the promised 1 month 👉🏿 #387 (comment). 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant