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

Merged
merged 8 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lua/kanagawa-paper/highlights/editor.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

local M = {}

---@param colors KanagawaColors
Expand Down Expand Up @@ -124,11 +125,11 @@ function M.setup(colors, opts)
-- StatusLineNC Status lines of not-current windows. Note: If this is equal to "StatusLine", Vim will use "^^^" in the status line of the current window.
StatusLineNC = { fg = theme.ui.nontext, bg = theme.ui.bg_m4 },
-- TabLine Tab pages line, not active tab page label.
TabLine = { bg = theme.ui.bg_tabline, fg = theme.ui.special },
TabLine = { fg = theme.ui.tabline.fg_inactive, bg = theme.ui.tabline.bg_inactive },
-- TabLineFill Tab pages line, where there are no labels.
TabLineFill = { bg = theme.ui.bg_tabline },
TabLineFill = { bg = theme.ui.tabline.bg },
-- TabLineSel Tab pages line, active tab page label.
TabLineSel = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1 },
TabLineSel = { fg = theme.ui.tabline.fg_selected, bg = theme.ui.tabline.bg_selected },
-- Title Titles for output from ":set all", ":autocmd" etc.
Title = { fg = theme.syn.fun, bold = true },
-- Visual Visual mode selection.
Expand Down
84 changes: 42 additions & 42 deletions lua/kanagawa-paper/highlights/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,68 +347,68 @@ function M.setup(colors, opts)
RainbowDelimiterCyan = { fg = theme.rainbow.rainbow7 },

-- Bufferline
BufferlineFill = { bg = theme.ui.bg_tabline },
BufferlineFill = { bg = theme.ui.tabline.bg },
BufferlineNumbers = {
bg = not opts.transparent and theme.ui.bg_tabline or "NONE",
bg = not opts.transparent and theme.ui.tabline.bg or "NONE",
fg = theme.ui.fg_dim,
bold = true,
},
BufferlineNumbersSelected = { fg = palette.dragonBlue, bold = true },
BufferlineBuffer = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim, bold = false },
BufferlineBufferSelected = { bg = theme.ui.bg, fg = palette.dragonWhite, bold = true },
BufferlineBuffer = { fg = theme.ui.tabline.fg_inactive, bg = theme.ui.tabline.bg_inactive, bold = false },
BufferlineBufferSelected = { fg = theme.ui.tabline.fg_selected, bg = theme.ui.tabline.bg_selected, bold = true },
BufferlineIndicatorSelected = { fg = palette.dragonBlue },
BufferlineModified = {
bg = not opts.transparent and theme.ui.bg_tabline or "NONE",
bg = not opts.transparent and theme.ui.tabline.bg or "NONE",
fg = theme.vcs.changed,
},
BufferlineModifiedSelected = { bg = theme.ui.bg, fg = theme.vcs.changed },
BufferlineModifiedSelected = { fg = theme.vcs.changed, bg = theme.ui.tabline.bg_selected },
BufferlineCloseButton = {
bg = not opts.transparent and theme.ui.bg_tabline or "NONE",
bg = not opts.transparent and theme.ui.tabline.bg or "NONE",
fg = theme.ui.fg_dim,
bold = false,
},
BufferlineCloseButtonSelected = { fg = palette.dragonRed, bold = true },
BufferlineTab = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim },
BufferlineTabClose = { bg = theme.ui.bg_p1, fg = palette.dragonRed },
BufferlineTabSelected = { bg = theme.ui.bg_p1, fg = palette.dragonWhite, bold = true },
BufferlineTabSeparator = { bg = theme.ui.bg_tabline, fg = theme.ui.bg_tabline },
BufferlineTabSeparatorSelected = { bg = theme.ui.bg_tabline, fg = theme.ui.bg_tabline },
BufferlineSeparator = { fg = theme.ui.bg_tabline, bg = theme.ui.bg_tabline },
BufferlineSeparatorSelected = { fg = theme.ui.bg_tabline, bg = theme.ui.bg_tabline },
BufferlineTab = { fg = theme.ui.tabline.fg_inactive, bg = theme.ui.tabline.bg },
BufferlineTabClose = { fg = palette.dragonRed, bg = theme.ui.tabline.bg },
BufferlineTabSelected = { fg = theme.ui.tabline.fg_selected, bg = theme.ui.tabline.bg_selected, bold = true },
BufferlineTabSeparator = { fg = theme.ui.tabline.bg, bg = theme.ui.tabline.bg },
BufferlineTabSeparatorSelected = { fg = theme.ui.tabline.bg, bg = theme.ui.tabline.bg },
BufferlineSeparator = { fg = theme.ui.tabline.bg, bg = theme.ui.tabline.bg },
BufferlineSeparatorSelected = { fg = theme.ui.tabline.bg, bg = theme.ui.tabline.bg },

-- barbar
BufferInactive = { link = "BufferlineBuffer" },
BufferInactiveSign = { link = "BufferLineSeparator" },
BufferInactiveBtn = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim },
BufferInactiveBtn = { bg = theme.ui.tabline.bg_inactive, fg = theme.ui.tabline.fg_inactive },
BufferInactiveMod = { link = "BufferInactive" },
BufferInactiveModBtn = { bg = theme.ui.bg_tabline, fg = theme.vcs.changed },
BufferInactiveTarget = { bg = theme.ui.bg_tabline, fg = theme.ui.picker, bold = true },
BufferInactiveIndex = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim, bold = true },
BufferInactiveNumber = { bg = theme.ui.bg_tabline, fg = theme.ui.fg_dim, bold = true },
BufferInactiveModBtn = { bg = theme.ui.tabline.bg_inactive, fg = theme.vcs.changed },
BufferInactiveTarget = { bg = theme.ui.tabline.bg_inactive, fg = theme.ui.picker, bold = true },
BufferInactiveIndex = { bg = theme.ui.tabline.bg_inactive, fg = theme.ui.tabline.fg_inactive, bold = true },
BufferInactiveNumber = { bg = theme.ui.tabline.bg_inactive, fg = theme.ui.tabline.fg_inactive, bold = true },
BufferCurrent = { link = "BufferlineBufferSelected" },
BufferCurrentBtn = { bg = theme.ui.bg, fg = palette.dragonRed, bold = true },
BufferCurrentBtn = { bg = theme.ui.tabline.bg_selected, fg = palette.dragonRed, bold = true },
BufferCurrentSign = { bg = palette.dragonBlue, fg = palette.dragonBlue },
BufferCurrentMod = { link = "BufferCurrent" },
BufferCurrentModBtn = { link = "BufferlineModifiedSelected" },
BufferCurrentTarget = { bg = theme.ui.bg, fg = theme.ui.picker, bold = true },
BufferCurrentIndex = { bg = theme.ui.bg, fg = palette.dragonWhite, bold = true },
BufferCurrentNumber = { bg = theme.ui.bg, fg = palette.dragonWhite, bold = true },
BufferCurrentHINT = { bg = theme.ui.bg, fg = theme.diag.hint },
BufferCurrentINFO = { bg = theme.ui.bg, fg = theme.diag.info },
BufferCurrentWARN = { bg = theme.ui.bg, fg = theme.diag.warning },
BufferCurrentERROR = { bg = theme.ui.bg, fg = theme.diag.error },
BufferCurrentADDED = { bg = theme.ui.bg, fg = theme.vcs.added },
BufferCurrentCHANGED = { bg = theme.ui.bg, fg = theme.vcs.changed },
BufferCurrentDELETED = { bg = theme.ui.bg, fg = theme.vcs.removed },
BufferAlternate = { bg = theme.ui.bg_tabline, fg = palette.dragonPink },
BufferCurrentTarget = { bg = theme.ui.tabline.bg_selected, fg = theme.ui.picker, bold = true },
BufferCurrentIndex = { bg = theme.ui.tabline.bg_selected, fg = theme.ui.tabline.fg_selected, bold = true },
BufferCurrentNumber = { bg = theme.ui.tabline.bg_selected, fg = theme.ui.tabline.fg_selected, bold = true },
BufferCurrentHINT = { bg = theme.ui.tabline.bg_selected, fg = theme.diag.hint },
BufferCurrentINFO = { bg = theme.ui.tabline.bg_selected, fg = theme.diag.info },
BufferCurrentWARN = { bg = theme.ui.tabline.bg_selected, fg = theme.diag.warning },
BufferCurrentERROR = { bg = theme.ui.tabline.bg_selected, fg = theme.diag.error },
BufferCurrentADDED = { bg = theme.ui.tabline.bg_selected, fg = theme.vcs.added },
BufferCurrentCHANGED = { bg = theme.ui.tabline.bg_selected, fg = theme.vcs.changed },
BufferCurrentDELETED = { bg = theme.ui.tabline.bg_selected, fg = theme.vcs.removed },
BufferAlternate = { bg = theme.ui.tabline.bg, fg = palette.dragonPink },
BufferAlternateSign = { link = "BufferAlternate" },
BufferAlternateBtn = { link = "BufferAlternate" },
BufferAlternateMod = { link = "BufferAlternate" },
BufferAlternateModBtn = { bg = theme.ui.bg_tabline, fg = theme.vcs.changed },
BufferAlternateTarget = { bg = theme.ui.bg_tabline, fg = theme.ui.picker, bold = true },
BufferAlternateIndex = { bg = theme.ui.bg_tabline, fg = palette.dragonPink, bold = true },
BufferAlternateNumber = { bg = theme.ui.bg_tabline, fg = palette.dragonPink, bold = true },
BufferTabpages = { bg = theme.ui.bg_tabline, fg = palette.dragonWhite, bold = true },
BufferAlternateModBtn = { bg = theme.ui.tabline.bg, fg = theme.vcs.changed },
BufferAlternateTarget = { bg = theme.ui.tabline.bg, fg = theme.ui.picker, bold = true },
BufferAlternateIndex = { bg = theme.ui.tabline.bg, fg = palette.dragonPink, bold = true },
BufferAlternateNumber = { bg = theme.ui.tabline.bg, fg = palette.dragonPink, bold = true },
BufferTabpages = { bg = theme.ui.tabline.bg, fg = theme.ui.tabline.fg_selected, bold = true },
BufferTabpageFill = { link = "BufferlineFill" },
BufferTabpagesSep = { link = "BufferTabpages" },

Expand Down Expand Up @@ -635,14 +635,14 @@ function M.setup(colors, opts)

MiniSurround = { link = "IncSearch" },

MiniTablineCurrent = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1, bold = true },
MiniTablineCurrent = { fg = theme.ui.tabline.fg_selected, bg = theme.ui.tabline.bg_selected, bold = true },
MiniTablineFill = { link = "TabLineFill" },
MiniTablineHidden = { fg = theme.ui.special, bg = theme.ui.bg_m3 },
MiniTablineModifiedCurrent = { fg = theme.ui.bg_p1, bg = theme.ui.fg_dim, bold = true },
MiniTablineModifiedHidden = { fg = theme.ui.bg_m3, bg = theme.ui.special },
MiniTablineModifiedVisible = { fg = theme.ui.bg_m3, bg = theme.ui.special, bold = true },
MiniTablineHidden = { fg = theme.ui.special, bg = theme.ui.tabline.bg },
MiniTablineModifiedCurrent = { fg = theme.ui.tabline.bg_selected, bg = theme.ui.tabline.fg_selected, bold = true },
MiniTablineModifiedHidden = { fg = theme.ui.tabline.bg, bg = theme.ui.special },
MiniTablineModifiedVisible = { fg = theme.ui.tabline.bg, bg = theme.ui.special, bold = true },
MiniTablineTabpagesection = { fg = theme.ui.fg, bg = theme.ui.bg_search, bold = true },
MiniTablineVisible = { fg = theme.ui.special, bg = theme.ui.bg_m3, bold = true },
MiniTablineVisible = { fg = theme.ui.special, bg = theme.ui.tabline.bg, bold = true },

MiniTestEmphasis = { bold = true },
MiniTestFail = { fg = theme.diag.error, bold = true },
Expand Down
21 changes: 16 additions & 5 deletions lua/kanagawa-paper/themes.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---@class SyntaxElements
---@field string ColorSpec
---@field variable ColorSpec
Expand Down Expand Up @@ -71,7 +72,6 @@
---@field bg_search ColorSpec
---@field bg_cursorline ColorSpec
---@field bg_visual ColorSpec
---@field bg_tabline ColorSpec
---@field bg_statusline ColorSpec
---@field special ColorSpec SpecialKey
---@field nontext ColorSpec LineNr, NonText
Expand All @@ -81,9 +81,17 @@
---@field indent_scope ColorSpec Indent scope character
---@field picker ColorSpec Color of picker letters e.g. bufferline pick buffer
---@field scrollbar ColorSpec Color of scrollbar
---@field tabline TabElements
---@field pmenu MenuElements
---@field float FloatElements

---@class TabElements
---@field bg ColorSpec
---@field fg_selected ColorSpec
---@field bg_selected ColorSpec
---@field fg_inactive ColorSpec
---@field bg_inactive ColorSpec

---@class FloatElements
---@field fg ColorSpec
---@field bg ColorSpec
Expand Down Expand Up @@ -136,7 +144,6 @@ return function(palette)
fg_dark = palette.dragonBlack3,
fg_dim = palette.dragonBlack5,
fg_reverse = palette.waveBlue1,

bg_m4 = palette.sumiInkn1,
bg_m3 = palette.sumiInk0,
bg_m2 = palette.sumiInk1,
Expand All @@ -149,18 +156,22 @@ return function(palette)
bg_search = palette.springViolet1,
bg_cursorline = palette.sumiInk5,
bg_visual = palette.lotusInk0,
bg_tabline = palette.sumiInk0,
thesimonho marked this conversation as resolved.
Show resolved Hide resolved
bg_statusline = palette.sumiInk4,

special = palette.springViolet1,
nontext = palette.sumiInk6,
whitespace = palette.sumiInk6,

win_separator = palette.dragonViolet,
indent = palette.sumiInk5,
indent_scope = palette.dragonViolet,
picker = palette.dragonRed,
scrollbar = palette.fujiGray,
tabline = {
bg = palette.sumiInk0,
fg_selected = palette.dragonWhite,
bg_selected = palette.sumiInk3,
fg_inactive = palette.dragonBlack5,
bg_inactive = palette.sumiInk0,
},
pmenu = {
fg = palette.fujiWhite,
fg_sel = "none", -- This is important to make highlights pass-through
Expand Down