Skip to content

Commit

Permalink
Merge pull request #51 from killitar/refactor
Browse files Browse the repository at this point in the history
refactoring: split `theme.lua` into separate groups.
  • Loading branch information
redoxahmii authored Jan 6, 2025
2 parents 44d3b9d + bed82a2 commit ca97047
Show file tree
Hide file tree
Showing 69 changed files with 1,618 additions and 1,117 deletions.
22 changes: 19 additions & 3 deletions lua/lualine/themes/solarized-osaka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,25 @@ solarized_osaka.terminal = {
}

solarized_osaka.inactive = {
a = { bg = colors.bg_statusline, fg = colors.blue },
b = { bg = colors.bg_statusline, fg = colors.fg, gui = "bold" },
c = { bg = colors.bg_statusline, fg = colors.fg },
a = {
bg = config.hide_inactive_statusline and colors.none or colors.bg_statusline,
fg = config.hide_inactive_statusline and colors.bg or colors.blue,
sp = config.hide_inactive_statusline and colors.border or colors.none,
underline = config.hide_inactive_statusline,
},
b = {
bg = config.hide_inactive_statusline and colors.none or colors.bg_statusline,
fg = config.hide_inactive_statusline and colors.bg or colors.fg,
sp = config.hide_inactive_statusline and colors.border or colors.none,
underline = config.hide_inactive_statusline,
gui = "bold",
},
c = {
bg = config.hide_inactive_statusline and colors.none or colors.bg_statusline,
fg = config.hide_inactive_statusline and colors.bg or colors.fg,
sp = config.hide_inactive_statusline and colors.border or colors.none,
underline = config.hide_inactive_statusline,
},
}

if config.lualine_bold then
Expand Down
13 changes: 13 additions & 0 deletions lua/solarized-osaka/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ local defaults = {
---@param colors ColorScheme
on_highlights = function(highlights, colors) end,
use_background = true, -- can be light/dark/auto. When auto, background will be set to vim.o.background
---@type table<string, boolean|{enabled:boolean}>
plugins = {
-- enable all plugins when not using lazy.nvim
-- set to false to manually enable/disable plugins
all = package.loaded.lazy == nil,
-- uses your plugin manager to automatically enable needed plugins
-- currently only lazy.nvim is supported
auto = true,
-- add any plugins here that you want to enable
-- for all possible plugins, see:
-- * https://github.com/craftzdog/solarized-osaka.nvim/tree/main/lua/solarized-osaka/groups
-- flash = true,
},
}

---@type Config
Expand Down
14 changes: 14 additions & 0 deletions lua/solarized-osaka/groups/alpha.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local M = {}

function M.get(c)
-- stylua: ignore
return {
AlphaShortcut = { fg = c.orange },
AlphaHeader = { fg = c.blue },
AlphaHeaderLabel = { fg = c.orange },
AlphaFooter = { fg = c.cyan },
AlphaButtons = { fg = c.cyan },
}
end

return M
50 changes: 50 additions & 0 deletions lua/solarized-osaka/groups/barbar.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
local Util = require("solarized-osaka.util")

local M = {}

function M.get(c, opts)
--stylua: ignore
return {
BufferCurrent = { bg = c.bg, fg = c.fg },
BufferCurrentERROR = { bg = c.bg, fg = c.error },
BufferCurrentHINT = { bg = c.bg, fg = c.hint },
BufferCurrentINFO = { bg = c.bg, fg = c.info },
BufferCurrentWARN = { bg = c.bg, fg = c.warning },
BufferCurrentIndex = { bg = c.bg, fg = c.info },
BufferCurrentMod = { bg = c.bg, fg = c.warning },
BufferCurrentSign = { bg = c.bg, fg = c.bg },
BufferCurrentTarget = { bg = c.bg, fg = c.red },
BufferAlternate = { bg = c.base01, fg = c.fg },
BufferAlternateERROR = { bg = c.base01, fg = c.error },
BufferAlternateHINT = { bg = c.base01, fg = c.hint },
BufferAlternateIndex = { bg = c.base01, fg = c.info },
BufferAlternateINFO = { bg = c.base01, fg = c.info },
BufferAlternateMod = { bg = c.base01, fg = c.warning },
BufferAlternateSign = { bg = c.base01, fg = c.info },
BufferAlternateTarget = { bg = c.base01, fg = c.red },
BufferAlternateWARN = { bg = c.base01, fg = c.warning },
BufferVisible = { bg = c.bg_statusline, fg = c.fg },
BufferVisibleERROR = { bg = c.bg_statusline, fg = c.error },
BufferVisibleHINT = { bg = c.bg_statusline, fg = c.hint },
BufferVisibleINFO = { bg = c.bg_statusline, fg = c.info },
BufferVisibleWARN = { bg = c.bg_statusline, fg = c.warning },
BufferVisibleIndex = { bg = c.bg_statusline, fg = c.info },
BufferVisibleMod = { bg = c.bg_statusline, fg = c.warning },
BufferVisibleSign = { bg = c.bg_statusline, fg = c.info },
BufferVisibleTarget = { bg = c.bg_statusline, fg = c.red },
BufferInactive = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.violet500, 0.8) },
BufferInactiveERROR = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.error, 0.8) },
BufferInactiveHINT = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.hint, 0.8) },
BufferInactiveINFO = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.info, 0.8) },
BufferInactiveWARN = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.warning, 0.8) },
BufferInactiveIndex = { bg = Util.darken(c.bg_highlight, 0.4), fg = c.violet500 },
BufferInactiveMod = { bg = Util.darken(c.bg_highlight, 0.4), fg = Util.darken(c.warning, 0.8) },
BufferInactiveSign = { bg = Util.darken(c.bg_highlight, 0.4), fg = c.bg },
BufferInactiveTarget = { bg = Util.darken(c.bg_highlight, 0.4), fg = c.red },
BufferOffset = { bg = c.bg_statusline, fg = c.violet500 },
BufferTabpageFill = { bg = Util.darken(c.bg_highlight, 0.8), fg = c.violet500 },
BufferTabpages = { bg = c.bg_statusline, fg = c.none },
}
end

return M
50 changes: 50 additions & 0 deletions lua/solarized-osaka/groups/blink.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
local M = {}

function M.get(c, opts)
--stylua: ignore
return {
BlinkCmpLabel = { fg = c.fg, bg = c.none },
BlinkCmpLabelDeprecated = { fg = c.base01, bg = c.none, strikethrough = true },
--INFO: unused at the moment but passed still for future use
BlinkCmpLabelMatch = { fg = c.violet500, bg = c.none },
-- Documentation windows
BlinkCmpDoc = { fg = c.fg, bg = c.bg_float },
BlinkCmpDocBorder = { fg = c.base02, bg = c.bg_float },
BlinkCmpGhostText = { fg = c.base01 },
-- Signature help
BlinkCmpSignatureHelp = { fg = c.violet500, bg = c.none },
BlinkCmpSignatureHelpBorder = { fg = c.base02, bg = c.none },
BlinkCmpSignatureHelpActiveParameter = { fg = c.orange, bg = c.none },
-- ISSUE: passing c.none causes menu to be invisible
-- BlinkCmpMenu = { fg = c.base01, bg = c.none },
BlinkCmpMenu = { fg = c.base01, bg = c.base02 },
BlinkCmpKindDefault = { fg = c.base01, bg = c.none }, -- Default fallback
BlinkCmpKindCodeium = { fg = c.cyan500, bg = c.none },
BlinkCmpKindCopilot = { fg = c.cyan500, bg = c.none },
BlinkCmpKindTabNine = { fg = c.cyan500, bg = c.none },
BlinkCmpKindSupermaven = { fg = c.cyan500, bg = c.none },
BlinkCmpKindKeyword = { fg = c.cyan, bg = c.none },
BlinkCmpKindVariable = { fg = c.magenta, bg = c.none },
BlinkCmpKindConstant = { fg = c.magenta, bg = c.none },
BlinkCmpKindReference = { fg = c.magenta, bg = c.none },
BlinkCmpKindValue = { fg = c.magenta, bg = c.none },
BlinkCmpKindFunction = { fg = c.blue, bg = c.none },
BlinkCmpKindMethod = { fg = c.blue, bg = c.none },
BlinkCmpKindConstructor = { fg = c.blue, bg = c.none },
BlinkCmpKindClass = { fg = c.orange, bg = c.none },
BlinkCmpKindInterface = { fg = c.orange, bg = c.none },
BlinkCmpKindStruct = { fg = c.orange, bg = c.none },
BlinkCmpKindEvent = { fg = c.orange, bg = c.none },
BlinkCmpKindEnum = { fg = c.orange, bg = c.none },
BlinkCmpKindUnit = { fg = c.orange, bg = c.none },
BlinkCmpKindModule = { fg = c.yellow, bg = c.none },
BlinkCmpKindProperty = { fg = c.cyan, bg = c.none },
BlinkCmpKindField = { fg = c.cyan, bg = c.none },
BlinkCmpKindTypeParameter = { fg = c.cyan, bg = c.none },
BlinkCmpKindEnumMember = { fg = c.cyan, bg = c.none },
BlinkCmpKindOperator = { fg = c.cyan, bg = c.none },
BlinkCmpKindSnippet = { fg = c.violet500, bg = c.none },
}
end

return M
10 changes: 10 additions & 0 deletions lua/solarized-osaka/groups/bufferline.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local M = {}

function M.get(c, opts)
--stylua: ignore
return {
BufferLineIndicatorSelected = { fg = c.yellow500 },
}
end

return M
51 changes: 51 additions & 0 deletions lua/solarized-osaka/groups/cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
local M = {}

function M.get(c, opts)
--stylua: ignore
return {
CmpDocumentation = { fg = c.fg, bg = c.bg_float },
CmpDocumentationBorder = { fg = c.base02, bg = c.bg_float },
CmpGhostText = { fg = c.base01 },

CmpItemAbbr = { fg = c.fg, bg = c.none },
CmpItemAbbrDeprecated = { fg = c.base01, bg = c.none, strikethrough = true },
CmpItemAbbrMatch = { fg = c.violet500, bg = c.none },
CmpItemAbbrMatchFuzzy = { fg = c.violet500, bg = c.none },

CmpItemMenu = { fg = c.base01, bg = c.none },

CmpItemKindDefault = { fg = c.base01, bg = c.none },

CmpItemKindCodeium = { fg = c.cyan500, bg = c.none },
CmpItemKindCopilot = { fg = c.cyan500, bg = c.none },
CmpItemKindTabNine = { fg = c.cyan500, bg = c.none },

CmpItemKindKeyword = { fg = c.cyan, bg = c.none },
CmpItemKindVariable = { fg = c.magenta, bg = c.none },
CmpItemKindConstant = { fg = c.magenta, bg = c.none },
CmpItemKindReference = { fg = c.magenta, bg = c.none },
CmpItemKindValue = { fg = c.magenta, bg = c.none },

CmpItemKindFunction = { fg = c.blue, bg = c.none },
CmpItemKindMethod = { fg = c.blue, bg = c.none },
CmpItemKindConstructor = { fg = c.blue, bg = c.none },

CmpItemKindClass = { fg = c.orange, bg = c.none },
CmpItemKindInterface = { fg = c.orange, bg = c.none },
CmpItemKindStruct = { fg = c.orange, bg = c.none },
CmpItemKindEvent = { fg = c.orange, bg = c.none },
CmpItemKindEnum = { fg = c.orange, bg = c.none },
CmpItemKindUnit = { fg = c.orange, bg = c.none },

CmpItemKindModule = { fg = c.yellow, bg = c.none },

CmpItemKindProperty = { fg = c.cyan, bg = c.none },
CmpItemKindField = { fg = c.cyan, bg = c.none },
CmpItemKindTypeParameter = { fg = c.cyan, bg = c.none },
CmpItemKindEnumMember = { fg = c.cyan, bg = c.none },
CmpItemKindOperator = { fg = c.cyan, bg = c.none },
CmpItemKindSnippet = { fg = c.violet500, bg = c.none },
}
end

return M
16 changes: 16 additions & 0 deletions lua/solarized-osaka/groups/dashboard.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local M = {}

function M.get(c, opts)
-- stylua: ignore
return {
DashboardShortCut = { fg = c.cyan },
DashboardHeader = { fg = c.blue },
DashboardCenter = { fg = c.magenta },
DashboardFooter = { fg = c.yellow, italic = true },
DashboardKey = { fg = c.orange500 },
DashboardDesc = { fg = c.cyan500 },
DashboardIcon = { fg = c.cyan500, bold = true },
}
end

return M
Loading

0 comments on commit ca97047

Please sign in to comment.