Skip to content

Commit

Permalink
feat: update mode colors for lualine
Browse files Browse the repository at this point in the history
  • Loading branch information
sho-87 committed Jun 3, 2024
1 parent 89146cc commit 0d8ec61
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
15 changes: 15 additions & 0 deletions lua/kanagawa-paper/themes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
---@field removed ColorSpec
---@field changed ColorSpec

---@class ModeElements
---@field normal ColorSpec
---@field insert ColorSpec
---@field visual ColorSpec
---@field replace ColorSpec
---@field command ColorSpec

---@class UiElements
---@field fg ColorSpec Default foreground
---@field fg_dim ColorSpec Dimmed foreground
Expand Down Expand Up @@ -77,6 +84,7 @@
---@field vcs VCSElements
---@field diff DiffElements
---@field ui UiElements
---@field modes ModeElements
---@field term ColorSpec[]

---@param palette PaletteColors
Expand All @@ -85,6 +93,13 @@ return function(palette)
local gutter_bg = require("kanagawa-paper.config").options.gutter and palette.sumiInk4 or "none"

return {
modes = {
normal = palette.dragonYellow,
insert = palette.dragonRed,
visual = palette.dragonBlue,
replace = palette.dragonRed,
command = palette.dragonYellow,
},
ui = {
fg = palette.fujiWhite,
fg_dim = palette.oldWhite,
Expand Down
25 changes: 13 additions & 12 deletions lua/lualine/themes/kanagawa-paper.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
local theme = require("kanagawa-paper.colors").setup().theme
local colors = require("kanagawa-paper.colors").setup()
local theme = colors.theme

local kanagawa_paper = {}

kanagawa_paper.normal = {
a = { bg = theme.syn.fun, fg = theme.ui.bg_m3 },
b = { bg = theme.diff.change, fg = theme.syn.fun },
c = { bg = theme.ui.bg_p1, fg = theme.ui.fg },
a = { bg = theme.modes.normal, fg = theme.ui.bg_m3 },
b = { bg = theme.ui.bg_p2, fg = theme.modes.normal },
c = { bg = theme.ui.bg_p1, fg = theme.ui.fg_dim },
}

kanagawa_paper.insert = {
a = { bg = theme.diag.ok, fg = theme.ui.bg },
b = { bg = theme.ui.bg, fg = theme.diag.ok },
a = { bg = theme.modes.insert, fg = theme.ui.bg },
b = { bg = theme.ui.bg_p2, fg = theme.modes.insert },
}

kanagawa_paper.command = {
a = { bg = theme.syn.operator, fg = theme.ui.bg },
b = { bg = theme.ui.bg, fg = theme.syn.operator },
a = { bg = theme.modes.command, fg = theme.ui.bg },
b = { bg = theme.ui.bg_p2, fg = theme.modes.command },
}

kanagawa_paper.visual = {
a = { bg = theme.syn.keyword, fg = theme.ui.bg },
b = { bg = theme.ui.bg, fg = theme.syn.keyword },
a = { bg = theme.modes.visual, fg = theme.ui.bg },
b = { bg = theme.ui.bg_p2, fg = theme.modes.visual },
}

kanagawa_paper.replace = {
a = { bg = theme.syn.constant, fg = theme.ui.bg },
b = { bg = theme.ui.bg, fg = theme.syn.constant },
a = { bg = theme.modes.replace, fg = theme.ui.bg },
b = { bg = theme.ui.bg_p2, fg = theme.modes.replace },
}

kanagawa_paper.inactive = {
Expand Down

0 comments on commit 0d8ec61

Please sign in to comment.