mirror of
https://github.com/nvim-lualine/lualine.nvim
synced 2024-09-16 13:24:07 +02:00
Add support for base16-vim alongside nvim-base16 (#1006)
This commit is contained in:
parent
b5e8bb6421
commit
15d830d164
2 changed files with 23 additions and 3 deletions
|
@ -54,7 +54,7 @@ But if `g:ayuprefermirage` exists, it will load ayu_mirage instead when
|
|||
|
||||
### base16
|
||||
|
||||
This theme will automatically use colors defined by your colorscheme using [RRethy/nvim-base16](https://github.com/RRethy/nvim-base16)] plugin.
|
||||
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.
|
||||
The following example is using the `tomorrow-night` colorscheme:
|
||||
|
||||
<p>
|
||||
|
|
|
@ -50,7 +50,8 @@ local function setup_default()
|
|||
}
|
||||
end
|
||||
|
||||
local function setup_base16()
|
||||
local function setup_base16_nvim()
|
||||
-- Continue to load nvim-base16
|
||||
local loaded, base16 = pcall(require, 'base16-colorscheme')
|
||||
|
||||
if not loaded then
|
||||
|
@ -89,4 +90,23 @@ local function setup_base16()
|
|||
}
|
||||
end
|
||||
|
||||
return setup_base16() or setup_default()
|
||||
local function setup_base16_vim()
|
||||
-- Check if tinted-theming/base16-vim is already loaded
|
||||
if vim.g.base16_gui00 and vim.g.base16_gui0F then
|
||||
return setup {
|
||||
bg = vim.g.base16_gui01,
|
||||
alt_bg = vim.g.base16_gui02,
|
||||
dark_fg = vim.g.base16_gui03,
|
||||
fg = vim.g.base16_gui04,
|
||||
light_fg = vim.g.base16_gui05,
|
||||
normal = vim.g.base16_gui0D,
|
||||
insert = vim.g.base16_gui0B,
|
||||
visual = vim.g.base16_gui0E,
|
||||
replace = vim.g.base16_gui09,
|
||||
}
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
return setup_base16_vim() or setup_base16_nvim() or setup_default()
|
||||
|
|
Loading…
Reference in a new issue