Skip to content

Commit

Permalink
fix: add titned-vim support to base16 theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ducklin5 committed Dec 28, 2024
1 parent 09aafa2 commit 865d639
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions lua/lualine/themes/base16.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ local function setup_base16_nvim()
if not loaded then
add_notice(
'nvim-base16 is not currently present in your runtimepath, make sure it is properly installed,'
.. ' fallback to default colors.'
.. ' fallback to default colors.'
)

return nil
Expand All @@ -66,12 +66,12 @@ local function setup_base16_nvim()
if not base16.colors and not vim.env.BASE16_THEME then
add_notice(
'nvim-base16 is not loaded yet, you should update your configuration to load it before lualine'
.. ' so that the colors from your colorscheme can be used, fallback to "tomorrow-night" theme.'
.. ' so that the colors from your colorscheme can be used, fallback to "tomorrow-night" theme.'
)
elseif not base16.colors and not base16.colorschemes[vim.env.BASE16_THEME] then
add_notice(
'The colorscheme "%s" defined by the environment variable "BASE16_THEME" is not handled by'
.. ' nvim-base16, fallback to "tomorrow-night" theme.'
.. ' nvim-base16, fallback to "tomorrow-night" theme.'
)
end

Expand All @@ -92,7 +92,7 @@ end

local function setup_base16_vim()
-- Check if tinted-theming/base16-vim is already loaded
if (vim.g.base16_gui00 and vim.g.base16_gui0F) or (vim.g.tinted_gui00 and vim.g.tinted_gui0F) then
if (vim.g.base16_gui00 and vim.g.base16_gui0F) then
return setup {
bg = vim.g.base16_gui01,
alt_bg = vim.g.base16_gui02,
Expand All @@ -106,6 +106,19 @@ local function setup_base16_vim()
}
end

if (vim.g.tinted_gui00 and vim.g.tinted_gui0F) then
return setup {
bg = vim.g.tinted_gui01,
alt_bg = vim.g.tinted_gui02,
dark_fg = vim.g.tinted_gui03,
fg = vim.g.tinted_gui04,
light_fg = vim.g.tinted_gui05,
normal = vim.g.tinted_gui0D,
insert = vim.g.tinted_gui0B,
visual = vim.g.tinted_gui0E,
replace = vim.g.tinted_gui09,
}
end
return nil
end

Expand Down

0 comments on commit 865d639

Please sign in to comment.