Home

Awesome

Ayu - Banner

Ayu vim (unofficial fork)

From left to right let ayucolor = light, mirage, dark Ayu - Demonstration

With let g:ayu_extended_palette = 1: Ayu - Extended color palette

Installation

ayu only works if VIM supports termguicolors option. This is true for Neovim and VIM from 7.4.1799.

Plug 'Luxed/ayu-vim'    " or other package manager
"...
set termguicolors       " enable true colors support

set background=light    " for light version of theme
set background=dark     " for either mirage or dark version.
" NOTE: `background` controls `g:ayucolor`, but `g:ayucolor` doesn't control `background`

let g:ayucolor="mirage" " for mirage version of theme
let g:ayucolor="dark"   " for dark version of theme
" NOTE: g:ayucolor will default to 'dark' when not set. 

colorscheme ayu

Supported Plugins

Here is a list of plugins which have been customized to work better with this theme:

And here is a list of other supported syntax groups:

Options

let g:ayu_italic_comment = 1 " defaults to 0.
let g:ayu_sign_contrast = 1 " defaults to 0. If set to 1, SignColumn and FoldColumn will have a higher contrast instead of using the Normal background
let g:ayu_extended_palette = 1 " defaults to 0. If set to 1, enables extended palette. Adds more colors to some highlights (function keyword, loops, conditionals, imports)

nvim-ts-rainbow configuration

In your Tree-Sitter configuration add the following (in lua):

require('nvim-treesitter.configs').setup{
  rainbow = {
    enable = true,
    colors = require('ayu').rainbow_colors()
  }
}

Statusline support

Currently, the ayu-vim theme supports the following statusline plugins:

This is an example for lualine.nvim:

Light: image

Mirage: image

Dark: image

Customize The Theme To Your Liking

function! s:custom_ayu_colors()
  " Put whatever highlights you want here.
  " The ayu#hi function is defined as followed:
  " ayu#hi(highlight_group, foreground, background, [gui options])
  " See autoload/ayu.vim for color palette. 
  " `foreground` and `background` are required while the gui options are optional
  " `gui options` only represents the values you could put in the `gui` part of the highlight. See `:h highlight-gui`.
  call ayu#hi('IncSearch', '', 'vcs_modified')
endfunction

augroup custom_colors
  autocmd!
  autocmd ColorScheme ayu call s:custom_ayu_colors()
augroup END

Doing this will allow you to modify the theme to your liking while not modifying the colors for any other theme.

Related Projects