Skip to content

Luxed/ayu-vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • Vim8 and Neovim Terminals.
  • Diff syntax.
  • Netrw.
  • Neovim's Built-in LSP.
  • TreeSitter (Neovim only).
  • Javascript.
  • Vimscript.
  • XML.
  • INI.
  • Shell.
  • PHP.
  • Ruby.

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:

  • lualine.nvim. No setup is required. The theme is automatically applied.
  • vim-airline. No setup is required, but it is important to note that the ayu theme included in vim-airline-themes will override the one present here.
  • lightline.vim. Add the following to your config (or modify your current lightline config): let g:lightline = { 'colorscheme': 'ayu' }

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

  • ayu-vim: The official ayu-vim theme. It is currently un-maintained.
  • neovim-ayu: A reimplementation of the theme in lua for better Neovim and lua support.

About

Modern theme for modern VIMs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 90.4%
  • JavaScript 5.2%
  • Lua 4.4%