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

Added more detailed tabline configuration options #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

donniebreve
Copy link

@donniebreve donniebreve commented Feb 10, 2025

With default settings, I had an issue where the selected tab was difficult to read:
swappy-20250209-193913

The more I dug into it, the more control I wanted over the selected and inactive tab colors.
image

Thanks for the great theme!

Copy link
Owner

@thesimonho thesimonho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Would not have seen this as I dont use the regular tabline. Couple of changes in the comments and I'll merge this in

lua/kanagawa-paper/themes.lua Show resolved Hide resolved
win_separator = palette.dragonViolet,
indent = palette.sumiInk5,
indent_scope = palette.dragonViolet,
picker = palette.dragonRed,
scrollbar = palette.fujiGray,
tabline = {
bg = palette.sumiInk0,
fg_selected = palette.sumiInk3,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency across the different tabline/bufferline plugins, can we change the selected and inactive fg/bg colors to match the existing ones?
you can see plugins.lua BufferCurrent and BufferInactive as reference

I know theyre not as bright as the ones youve suggested here. Id rather keep the defaults consistent and not drastically change them on people, and instead have users override in their personal configs to their own taste

Copy link
Author

@donniebreve donniebreve Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. I've reset these to the default colors in 96333b9, although I think the default for the selected tab needs to be adjusted. Maybe we could set the foreground to the theme foreground color fujiWhite?

Example:
image
Here themes.lua is the selected tab and plugins.lua is an inactive tab.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might be looking at a different hlgroup. I think the defaults would make the values this? how does that look?

tabline = {
	bg = palette.sumiInk0,
	fg_selected = palette.dragonWhite,
	bg_selected = palette.sumiInk3,
	fg_inactive = palette.dragonBlack5,
	bg_inactive = palette.sumiInk0,
},

current defaults:

BufferCurrent = { link = "BufferlineBufferSelected" },
BufferlineBufferSelected = { bg = theme.ui.bg, fg = palette.dragonWhite, bold = true },

BufferInactive = { link = "BufferlineBuffer" },
BufferlineBuffer = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim, bold = false },

on my screen, with barbar, the theme looks like this, where colors is the selected, and the others are inactive:
image

Copy link
Owner

@thesimonho thesimonho Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see what happened - youre using the colors from the previous TabLine hlgroup

sorry I wasnt clear - I was meaning that we should make BufferCurrent/BufferInactive/etc the default colors, set those in your new tabline table. then update Tabline/BufferCurrent/etc to use your new table

the old TabLine hlgroup colors were not great at all

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the settings that were previously in editor.lua:

-- TabLine Tab pages line, not active tab page label.
TabLine = { bg = theme.ui.bg_tabline, fg = theme.ui.special },
-- TabLineFill	Tab pages line, where there are no labels.
TabLineFill = { bg = theme.ui.bg_tabline },
-- TabLineSel	Tab pages line, active tab page label.
TabLineSel = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1 },

Which makes the colors using the new config I introduced this:

tabline = {
  bg = palette.sumiInk0,               -- bg_tabline
  fg_selected = palette.dragonBlack5,  -- fg_dim
  bg_selected = palette.sumiInk4,      -- bg_p1
  fg_inactive = palette.springViolet1, -- special
  bg_inactive = palette.sumiInk0,      -- bg_tabline
},

Although it seems you're suggesting to use the colors configured for barbar as the "default". Is that right?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it seems you're suggesting to use the colors configured for barbar as the "default". Is that right?

thats correct

Copy link
Author

@donniebreve donniebreve Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've applied your suggestion in 360eef3.

image
Looks good to me!

I was meaning that we should make BufferCurrent/BufferInactive/etc the default colors, set those in your new tabline table. then update Tabline/BufferCurrent/etc to use your new table.

I thought you might ask for this 😆. It seems like the two configured tabline plugins are BufferLine and barbar. Are there any others? I'll update those configurations later today.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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