Coder Social home page Coder Social logo

ayu-vim's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.