Skip to content

Commit

Permalink
feat: hl group mason
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmx03 committed Aug 28, 2024
1 parent e41b3cf commit 138bb8a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/solarized/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
---@field telescope? boolean
---@field whichkey? boolean
---@field lazy? boolean
---@field mason? boolean
---@field enabled? boolean

---@class solarized.styles
Expand Down Expand Up @@ -51,6 +52,7 @@
---@field gitgutter? boolean
---@field coc? boolean
---@field leap? boolean
---@field mason? boolean

---@class solarized.config
---@field transparent? solarized.transparent
Expand All @@ -70,6 +72,7 @@ return {
whichkey = true,
telescope = true,
lazy = true,
mason = true,
},
on_highlights = nil,
on_colors = nil,
Expand Down Expand Up @@ -116,5 +119,6 @@ return {
alpha = true,
yanky = true,
gitgutter = true,
mason = true,
},
}
11 changes: 11 additions & 0 deletions lua/solarized/highlights/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,17 @@ M.set_highlight = function(colors, config)
nvim_set_hl('LeapBackDrop', { fg = colors.base01 })
end

if config.plugins.mason then
nvim_set_hl(
'MasonNormal',
{ fg = colors.base0, bg = colors.base04 },
{ transparent = config.transparent.mason and config.transparent.enabled }
)
nvim_set_hl('MasonHighlight', { fg = colors.cyan })
nvim_set_hl('MasonHighlightBlock', { fg = colors.mix_cyan, bg = colors.cyan })
nvim_set_hl('MasonHighlightBlockBold', { fg = colors.mix_cyan, bg = colors.cyan, bold = true })
end

if config.on_highlights then
local color = require 'solarized.color'
local highlights = config.on_highlights(colors, color)
Expand Down
11 changes: 11 additions & 0 deletions lua/solarized/highlights/solarized-light.lua
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,17 @@ M.set_highlight = function(colors, config)
nvim_set_hl('LeapBackDrop', { fg = colors.base01 })
end

if config.plugins.mason then
nvim_set_hl(
'MasonNormal',
{ fg = colors.base00, bg = colors.base4 },
{ transparent = config.transparent.mason and config.transparent.enabled }
)
nvim_set_hl('MasonHighlight', { fg = colors.blue })
nvim_set_hl('MasonHighlightBlock', { fg = colors.mix_blue, bg = colors.blue })
nvim_set_hl('MasonHighlightBlockBold', { fg = colors.mix_blue, bg = colors.blue, bold = true })
end

if config.on_highlights then
local color = require 'solarized.color'
local highlights = config.on_highlights(colors, color)
Expand Down

0 comments on commit 138bb8a

Please sign in to comment.