feat: ayu adaptive background (#584)
* feat: Enable adaptive theme for ayu theme * Update description of ayu theme * doc: make formatting consistent
This commit is contained in:
parent
605a30f2fe
commit
016a20711e
|
@ -40,8 +40,11 @@ it'll try it's best to generate one.
|
|||
</p>
|
||||
|
||||
### ayu
|
||||
It's a combination of ayu_light, ayu_dark & ayu_mirage. It loads one of these
|
||||
them based you your `g:ayucolor` option.
|
||||
It's a combination of ayu_light, ayu_dark & ayu_mirage. If `g:ayucolor` exists,
|
||||
it loads one of these based on your `g:ayucolor` option. Otherwise, it will
|
||||
load ayu_light when background=light and ayu_dark when background=dark
|
||||
But if `g:ayuprefermirage` exists, it will load ayu_mirage instead when
|
||||
`background=dark`.
|
||||
|
||||
### codedark
|
||||
<p>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-- MIT license, see LICENSE for more details.
|
||||
-- Credit: itchyny(lightline)
|
||||
-- License: MIT License
|
||||
local style = vim.g.ayucolor or 'dark'
|
||||
local background = vim.opt.background:get()
|
||||
local style = vim.g.ayucolor or ((background == 'dark') and vim.g.ayuprefermirage and 'mirage' or background)
|
||||
|
||||
return require('lualine.themes.ayu_' .. style)
|
||||
|
|
Loading…
Reference in New Issue