-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Groups #938
Groups #938
Conversation
Hi @kuro337, Thanks for the PR but I think as it is it is waaaay too big i.e. it introduces way too many changes that need discussion that it would take ages to get through all the points and merge. Can you please do this incrementally. Raise a small PR with the most crucial and minimal of your changes and we can go from there. Realistically based on the time I have available reviewing and commenting on all the changes here will take way too much time for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole file should not be committed I believe this is something generated locally IIRC
@@ -83,6 +87,13 @@ local function bufferline() | |||
left_offset_size = tabline.left_offset_size, | |||
right_offset_size = tabline.right_offset_size, | |||
}) | |||
|
|||
-- :BufferLineDebug -> prints the rendered tabline from the BufferLineDebug command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this command should be added at all tbh, fine to use something like this whilst debugging but not looking to have this sort of functionality exposed especially using global state like it appears to
@@ -671,7 +671,10 @@ local function get_defaults() | |||
diagnostics_update_in_insert = true, | |||
diagnostics_update_on_event = true, | |||
offsets = {}, | |||
groups = { items = {}, options = { toggle_hidden_on_enter = true } }, | |||
groups = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing defaults like this would require some conversation and convincing.
Mainly added logic to the groups functionality
Summary of Changes
Modified the separator.tab & separator.pill functions to add some features and use the display name if present
Cleaned up the render function in groups to remove the redundant loops
in the Group Setup - added group specific separator options - such as placing the sep at the start/end to mark visually mark buffers within it
Added functionality to Add/Remove groups arbitrarily, so the same tab can go in any group for flexibility
Added logic to remove a single tab from a Group
Added some helpers for render() and kept the old one for reference/comparison
Added a BufferLineDebug user command to print the rendered tabline with Highlights and Text with Padding
Updated the doc to provide more info on how to use options [doc/bufferline.txt]
Added a
set_bufferline_hls
function for the user to directly specify all the styles required for Group Labels and Buffers in one goFixed a bug with
BufferLineCyclePrev/Next
not working when the current buffer is toggled and in a groupMade the type on_close optional in bufferline.Group type
bufferline-groups.webm