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

Groups #938

Closed
wants to merge 5 commits into from
Closed

Groups #938

wants to merge 5 commits into from

Conversation

kuro337
Copy link

@kuro337 kuro337 commented Jul 16, 2024

Mainly added logic to the groups functionality

Summary of Changes

  1. Modified the separator.tab & separator.pill functions to add some features and use the display name if present

  2. Cleaned up the render function in groups to remove the redundant loops

  3. 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

  4. Added functionality to Add/Remove groups arbitrarily, so the same tab can go in any group for flexibility

  5. Added logic to remove a single tab from a Group

  6. Added some helpers for render() and kept the old one for reference/comparison

  7. Added a BufferLineDebug user command to print the rendered tabline with Highlights and Text with Padding

  8. Updated the doc to provide more info on how to use options [doc/bufferline.txt]

  9. Added a set_bufferline_hls function for the user to directly specify all the styles required for Group Labels and Buffers in one go

  10. Fixed a bug with BufferLineCyclePrev/Next not working when the current buffer is toggled and in a group

  11. Made the type on_close optional in bufferline.Group type

bufferline-groups.webm

@akinsho
Copy link
Owner

akinsho commented Jul 18, 2024

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

Copy link
Owner

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
Copy link
Owner

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 = {
Copy link
Owner

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.

@kuro337
Copy link
Author

kuro337 commented Jul 20, 2024

@akinsho Closing this PR - and created a new PR here!

#948

@kuro337 kuro337 closed this Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants