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

feat: sidebar_filetypes #395

Merged
merged 4 commits into from
Apr 2, 2023
Merged

feat: sidebar_filetypes #395

merged 4 commits into from
Apr 2, 2023

Conversation

Iron-E
Copy link
Collaborator

@Iron-E Iron-E commented Mar 29, 2023

Takes into account the position of the sidebar on the screen (i.e. left/right sidebar), as well as having multiple sidebars open (i.e. undotree and nvim-tree, or nvim-tree and symbols-outline).

Example config:

require'barbar'.setup {
  sidebar_filetypes = {
    NvimTree = true, -- default event and text
    ['neo-tree'] = {event = 'BufWipeout', text = 'neo-tree'}, -- custom event and text
  },
}

The diff will look better after merging #399.


Closes #391.
Closes #407.

@Iron-E Iron-E self-assigned this Mar 29, 2023
@Iron-E Iron-E added the request New feature or request label Mar 29, 2023
@Iron-E Iron-E force-pushed the feat/391 branch 6 times, most recently from b348611 to b083f46 Compare March 30, 2023 18:58
@Iron-E Iron-E changed the title feat: offset_filetypes feat: sidebar_filetypes Mar 30, 2023
@romgrk
Copy link
Owner

romgrk commented Apr 1, 2023

Neat idea. Do we expect any breaking changes for set_offset? Would it play nice with sidebar_filetypes or are they mutually exclusive?

@Iron-E
Copy link
Collaborator Author

Iron-E commented Apr 1, 2023

Do we expect any breaking changes for set_offset? Would it play nice with sidebar_filetypes or are they mutually exclusive?

sidebar_filetypes actually uses set_offset internally. The only change to set_offset was that it now accepts a 'left'|'right' arg at the final position, to control which side of the bufferline the offset appears on.

I wasn't planning on removing set_offset, just because I know there are a lot of users who use it in their configurations, and it could be useful to expose it just in case there's an edge case that sidebar_filetypes doesn't account for.

@Iron-E Iron-E force-pushed the feat/391 branch 3 times, most recently from feabfd2 to 3c51467 Compare April 2, 2023 20:02
@Iron-E
Copy link
Collaborator Author

Iron-E commented Apr 2, 2023

We can follow up on #421— right now this seems to work for the general case.

@Iron-E Iron-E merged commit 42c8b07 into master Apr 2, 2023
@Iron-E Iron-E deleted the feat/391 branch April 2, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration with filetree plugins doesn't work properly Automatically set up filetree support
2 participants