From left to right let ayucolor
= light
, mirage
, dark
With let g:ayu_extended_palette = 1
:
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
Here is a list of plugins which have been customized to work better with this theme:
- vim-gitgutter. Git sign column signs.
- vim-signify. General VCS sign column signs.
- NERDTree. File explorer.
- telescope.nvim. Fuzzy finder (neovim only).
- YATS. Yet Another TypeScript Syntax.
- fugitive.vim. Git helper.
- startify. Start screen plugin.
- vim-pandoc-syntax. Pandoc specific markdown syntax.
- haskell-vim. Haskell syntax highlighting.
- nvim-compe. Neovim completion plugin.
- nvim-ts-rainbow
- nvim-cmp. Neovim completion plugin, successor to compe.
- indent-blankline.nvim. Indentation guides.
- hlargs.nvim. Highlight arguments' definitions and usages.
- vim-illuminate. Automatically highlight other uses of the word under the cursor.
- nvim-lspconfig. Neovim lsp config quickstart.
- nvim-navic. Simple winbar/statusline plugin that shows your current code context.
- coc.nvim
- modicator.nvim. Cursor line mode indicator.
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.
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)
In your Tree-Sitter configuration add the following (in lua):
require('nvim-treesitter.configs').setup{
rainbow = {
enable = true,
colors = require('ayu').rainbow_colors()
}
}
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
:
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.
- 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.