Skip to content

Commit 6aa5360

Browse files
committed
Add support for base16-vim alongside nvim-base16
1 parent c28a742 commit 6aa5360

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

THEMES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ But if `g:ayuprefermirage` exists, it will load ayu_mirage instead when
5454

5555
### base16
5656

57-
This theme will automatically use colors defined by your colorscheme using [RRethy/nvim-base16](https://github.com/RRethy/nvim-base16)] plugin.
57+
This theme will automatically use colors defined by your colorscheme using [tinted-theming/base16-vim](https://github.com/tinted-theming/base16-vim) or [RRethy/nvim-base16](https://github.com/RRethy/nvim-base16)] plugin.
5858
The following example is using the `tomorrow-night` colorscheme:
5959

6060
<p>

lua/lualine/themes/base16.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ local function setup_default()
5151
end
5252

5353
local function setup_base16()
54+
-- Check if tinted-theming/base16-vim is loaded
55+
if vim.env.BASE16_THEME and vim.g.base16_gui01 and vim.g.base16_gui0F then
56+
return setup {
57+
bg = vim.g.base16_gui01,
58+
alt_bg = vim.g.base16_gui02,
59+
dark_fg = vim.g.base16_gui03,
60+
fg = vim.g.base16_gui04,
61+
light_fg = vim.g.base16_gui05,
62+
normal = vim.g.base16_gui0D,
63+
insert = vim.g.base16_gui0B,
64+
visual = vim.g.base16_gui0E,
65+
replace = vim.g.base16_gui09,
66+
}
67+
end
68+
69+
-- Continue to load nvim-base16
5470
local loaded, base16 = pcall(require, 'base16-colorscheme')
5571

5672
if not loaded then

0 commit comments

Comments
 (0)