everforest Documentation

Comfortable & Pleasant Color Scheme for Vim

4,252 stars Vim Script 1 file ยท ~7,203 tokens #airline#color-scheme#lightline#theme#vim
RAW Doc

Technical Documentation: sainnhe/everforest

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

๐„๐ฏ๐ž๐ซ๐Ÿ๐จ๐ซ๐ž๐ฌ๐ญ

๐ƒ๐š๐ซ๐ค ๐‹๐ข๐ ๐ก๐ญ
๐‡๐š๐ซ๐
๐Œ๐ž๐๐ข๐ฎ๐ฆ
๐’๐จ๐Ÿ๐ญ

Introduction

Everforest is a green based color scheme; it's designed to be warm and soft in order to protect developers' eyes.

Features

  • Green based but warm-toned.
  • Designed to have soft contrast for eye protection.
  • Works well with redshift and f.lux.
  • Customizable.
  • Rich support for common file types and plugins.
  • Tree-sitter support.
  • Semantic highlighting support.
  • Italic support ๐ŸŽ‰

Palette

๐ŸŽจ See Color Palette and Highlighting Semantics.

Documentation

See :help everforest.txt

See this wiki page.

Contributing

See this post.

More Color Schemes

Inspirations

Maintainers

Sainnhe Park Jef LeCompte Antoine Cotten

License

MIT ยฉ sainnhe


Doc Everforest (`doc/everforest.txt`)

everforest.txt Comfortable & Pleasant Color Scheme for Vim
everforest

text
______                ____                     __
       / ____/   _____  _____/ __/___  ________  _____/ /_
      / __/ | | / / _ \/ ___/ /_/ __ \/ ___/ _ \/ ___/ __/
     / /___ | |/ /  __/ /  / __/ /_/ / /  /  __(__  ) /_
    /_____/ |___/\___/_/  /_/  \____/_/   \___/____/\__/

<

==============================================================================
CONTENTS everforest-contents

Introduction |everforest-introduction|
Installation |everforest-installation|
Usage |everforest-usage|
Configuration |everforest-configuration|
FAQ |everforest-faq|

Note: Type |gO| in neovim to show the outline of contents.

==============================================================================
INTRODUCTION everforest-introduction

Everforest is a green based color scheme; it's designed to be warm and soft
in order to protect developers' eyes.

Features~

  • Green based but warm-toned.
  • Designed to have soft contrast for eye protection.
  • Works well with redshift and f.lux.
  • Customizable.
  • Rich support for common file types and plugins.
  • Tree-sitter support.
  • Semantic highlighting support.
  • Italic support ๐ŸŽ‰

==============================================================================
INSTALLATION everforest-installation

Note: For better syntax highlighting support, consider installing one of the
following plugins additionally to this colorscheme:

text
https://github.com/sheerun/vim-polyglot
https://github.com/nvim-treesitter/nvim-treesitter.

Via a Plugin Manager

VIM-PLUG

text
Plug 'sainnhe/everforest'

<
Refer to https://github.com/junegunn/vim-plug for further information.

LAZY.NVIM

In Neovim (Lua configuration):

text
{
  'sainnhe/everforest',
  lazy = false,
  priority = 1000,
  config = function()
    -- Optionally configure and load the colorscheme
    -- directly inside the plugin declaration.
    vim.g.everforest_enable_italic = true
    vim.cmd.colorscheme('everforest')
  end
}

<
Refer to https://github.com/folke/lazy.nvim for further information.


As a Native Vim Package

Users of Vim 8 and greater may leverage Vim's native |packages| system.

  1. Create a new directory: $ mkdir -p ~/.vim/pack/colors/opt

  2. Clone this repository: $ git clone --depth 1 https://github.com/sainnhe/everforest.git ~/.vim/pack/colors/opt/everforest

  3. Generate help tags: :helptags ~/.vim/pack/colors/opt/everforest/doc/

  4. Add packadd! everforest to your vimrc.

Note: If you install this color scheme to pack/*/start instead of
pack/*/opt, you still need to add packadd! everforest to your vimrc,
as discussed in the following issue:
https://github.com/sainnhe/gruvbox-material/issues/60


Manually

Users of Vim 7 and lower may install the colorscheme manually.

  1. Clone the repository: git clone --depth 1 https://github.com/sainnhe/everforest.git

  2. Copy everforest/autoload/everforest.vim to ~/.vim/autoload/.

  3. Copy everforest/colors/everforest.vim to ~/.vim/colors/.

  4. Copy everforest/doc/everforest.txt to ~/.vim/doc/ and
    execute :helptags ~/.vim/doc/ to generate help tags.

  5. To install the airline theme, copy
    everforest/autoload/airline/themes/everforest.vim
    to ~/.vim/autoload/airline/themes/.
    https://github.com/vim-airline/vim-airline

  6. To install the lightline theme,
    copy everforest/autoload/lightline/colorscheme/everforest.vim
    to ~/.vim/autoload/lightline/colorscheme/.
    https://github.com/itchyny/lightline.vim

  7. To install the lualine theme,
    copy everforest/lua/lualine/themes/everforest.lua
    to ~/.config/nvim/lua/lualine/themes/.
    https://github.com/nvim-lualine/lualine.nvim


AUR

There are some packages available for Arch Linux users in AUR:

text
https://aur.archlinux.org/pkgbase/vim-everforest-git (Vim)
https://aur.archlinux.org/pkgbase/neovim-everforest-git (Neovim)

==============================================================================
USAGE everforest-usage


Vim~

text
Put something like this in your vimrc:
text
" Important!!
    if has('termguicolors')
      set termguicolors
    endif

    " For dark version.
    set background=dark

    " For light version.
    set background=light

    " Set contrast.
    " This configuration option should be placed before `colorscheme everforest`.
    " Available values: 'hard', 'medium'(default), 'soft'
    let g:everforest_background = 'soft'

    " For better performance
    let g:everforest_better_performance = 1

    colorscheme everforest

<
See |everforest-configuration| for more configuration options.

text
If you want to apply this color scheme temporarily, run this command in
vim(this may cause broken colors):
text
:colorscheme everforest

<

Airline~

text
To enable [airline](https://github.com/vim-airline/vim-airline) color
scheme, put this in your vimrc:
text
let g:airline_theme = 'everforest'

<
To apply it without reloading:

text
:AirlineTheme everforest

<

Lightline~

text
To enable [lightline](https://github.com/itchyny/lightline.vim) color
scheme, put this in your vimrc:
text
let g:lightline = {}
    let g:lightline.colorscheme = 'everforest'

    " Or this line:
    let g:lightline = {'colorscheme' : 'everforest'}

<
To apply it without reloading:

text
:let g:lightline.colorscheme = 'everforest'
    :call lightline#init()
    :call lightline#colorscheme()

<

Lualine~

text
To enable [lualine](https://github.com/nvim-lualine/lualine.nvim) color
scheme, put this in your init.lua:
text
require'lualine'.setup {
      options = {
        theme = 'everforest'
      }
    }

<
To apply it without reloading:

text
:lua require'lualine'.setup {options = {theme = 'everforest'}}

<

CONFIGURATION everforest-configuration

Note: the configuration options should be placed before colorscheme everforest

E.g.

text
if has('termguicolors')
  set termguicolors
endif
set background=light

let g:everforest_background = 'soft'
let g:everforest_better_performance = 1

colorscheme everforest
let g:lightline = {'colorscheme' : 'everforest'}

<

text
*g:everforest_background*

g:everforest_background~

The background contrast used in this color scheme.

text
Type:               |String|
Available values:   `'hard'`, `'medium'`, `'soft'`
Default value:      `'medium'`

text
*g:everforest_enable_italic*

g:everforest_enable_italic~

To enable italic in this color scheme, set this option to 1.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

Note: This option is designed to use with fonts that support cursive italics.
See |everforest-faq| for more information.


text
*g:everforest_disable_italic_comment*

g:everforest_disable_italic_comment~

By default, italic is enabled in Comment. To disable italic in Comment, set
this option to 1.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

text
*g:everforest_cursor*

g:everforest_cursor~

Customize the cursor color.

The value 'auto' causes the color to change according to the foreground
color of the character under the cursor.

Requires setting the |guicursor| option as in the examples from the Vim doc for
the cursor to be styled according to |hl-Cursor|.

Only works in GUI clients and compatible terminal emulators.

text
Type:               |String|
Available values:   `''`, `'auto'`, `'red'`, `'orange'`, `'yellow'`, `'green'`,
`'aqua'`, `'blue'`, `'purple'`
Default value:      `''`

text
*g:everforest_transparent_background*

g:everforest_transparent_background~

To use transparent background, set this option to 1.

If you want more ui components to be transparent (for example, status line
background), set this option to 2.

text
Type:               |Number|
Available values:   `0`, `1`, `2`
Default value:      `0`

text
*g:everforest_dim_inactive_windows*

g:everforest_dim_inactive_windows~

Dim inactive windows. Only works in Neovim currently.

When this option is used in conjunction with |g:everforest_show_eob| set to 0,
the end of the buffer will only be hidden inside the active window. Inside
inactive windows, the end of buffer filler characters will be visible in
dimmed symbols. This is due to the way Vim and Neovim handle |hl-EndOfBuffer|.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

text
*g:everforest_sign_column_background*

g:everforest_sign_column_background~

By default, the background color of the sign and fold columns is the same as
the one of the normal text. 'grey' turns the background of the sign and fold
columns grey. 'linenr' applies an homogeneous grey background across the
sign, fold and line number columns. The latter is particularly suitable for a
usage with Neovim's |statuscolumn| option.

text
Type:               |String|
Available values:   `'none'`, `'grey'`, `'linenr'`
Default value:      `'none'`

text
*g:everforest_spell_foreground*

g:everforest_spell_foreground~

By default, this color scheme won't color the foreground of |spell|, instead
colored under curls will be used. If you also want to color the foreground,
set this option to 'colored'.

text
Type:               |String|
Available values:   `'none'`, `'colored'`
Default value:      `'none'`

text
*g:everforest_ui_contrast*

g:everforest_ui_contrast~

The contrast of line numbers, indent lines, etc.

text
Type:               |String|
Available values:   `'low'`, `'high'`
Default value:      `'low'`

text
*g:everforest_show_eob*

g:everforest_show_eob~

Whether to show |hl-EndOfBuffer|.

text
Type:               |Number|
Available values:   `1`, `0`
Default value:      `1`

text
*g:everforest_float_style*

g:everforest_float_style~

Style used to make Neovim's floating windows stand out from other windows.
'bright' makes the background of these windows lighter than |hl-Normal|,
whereas 'dim' makes it darker.

The value 'blend' causes floating windows to be displayed with the same
background as normal windows. Only use this style if Neovim is configured with
a non-empty |'winborder'|, otherwise floating windows will visually blend into
the main window without any distinctive delimiter. Plugins which create
floating windows without border by default may also need to be configured
individually.

Floating windows include for instance diagnostic pop-ups, scrollable
documentation windows from completion engines, overlay windows from
installers, etc.

text
Type:               |String|
Available values:   `'bright'`, `'dim'`, `'blend'`
Default value:      `'bright'`

text
*g:everforest_pmenu_style*

g:everforest_pmenu_style~

Controls the appearance of the completion popup menu (|ins-completion-menu|).
'bright' makes the menu's background lighter than |hl-Normal|, whereas 'dim'
makes it darker.

The value 'blend' causes the popup menu to be displayed with the same
background as normal windows. Only use this style if Neovim is configured with
a non-empty |'pumborder'|, otherwise the popup menu will visually blend into
the main window without any distinctive delimiter. Completion plugins which
create pseudo popup menus using the |hl-Pmenu| highlighting group and without
border by default may also need to be configured individually.

text
Type:               |String|
Available values:   `'bright'`, `'dim'`, `'blend'`
Default value:      `'bright'`

text
*g:everforest_diagnostic_text_highlight*

g:everforest_diagnostic_text_highlight~

Some plugins support highlighting error/warning/info/hint texts, by default
these texts are only underlined, but you can use this option to also highlight
the background of them.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

Currently, the following plugins are supported:


text
*g:everforest_diagnostic_line_highlight*

g:everforest_diagnostic_line_highlight~

Some plugins support highlighting error/warning/info/hint lines, but this
feature is disabled by default in this color scheme. To enable this feature,
set this option to 1.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

Currently, the following plugins are supported:


text
*g:everforest_diagnostic_virtual_text*

g:everforest_diagnostic_virtual_text~

Some plugins can use the virtual text feature of Neovim to display
error/warning/info/hint information. You can use this option to adjust the
way these virtual texts are highlighted.

text
Type:               |String|
Available values:   `'grey'`, `'colored'`, `'highlighted'`
Default value:      `'grey'`

Currently, the following plugins are supported:


text
*g:everforest_current_word*

g:everforest_current_word~

Some plugins can highlight the word under current cursor, you can use this
option to control their behavior.

text
Type:               |String|
Available values:   `'grey background'`, `'high contrast background'`, `'bold'`,
`'underline'`, `'italic'`
Default value:      `'grey background'` when not in transparent mode, `'bold'`
when in transparent mode.

Currently, the following plugins are supported:


text
*g:everforest_inlay_hints_background*

g:everforest_inlay_hints_background~

Inlay hints are special markers that are displayed inline with the code to
provide you with additional information. You can use this option to customize
the background color of inlay hints.

text
Type:               |String|
Available values:   `'none'`, `'dimmed'`
Default value:      `'none'`

Currently, the following LSP clients are supported:


text
*g:everforest_disable_terminal_colors*

g:everforest_disable_terminal_colors~

Setting this option to 1 will disable terminal colors provided by this color
scheme so you can remain terminal colors the same when using |:terminal| in
vim and outside of vim.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

text
*g:everforest_lightline_disable_bold*

g:everforest_lightline_disable_bold~

By default, bold is enabled in lightline color scheme. To disable bold in
lightline color scheme, set this option to 1.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

Note: this configuration option doesn't need to be placed before colorscheme everforest


text
*g:everforest_better_performance*

g:everforest_better_performance~

The loading time of this color scheme might be long because too many file
types and plugins are optimized. This option allows you to load part of the
code on demand by placing them in the after/syntax directory.

Enabling this option will reduce loading time by approximately 50%, but in
most cases it will only reduce tens of milliseconds, which you may not be very
aware of it.

This option can be particularly useful on low-performance machines, such as
the Raspberry Pi, where it may be possible to reduce loading time by hundreds
of milliseconds.

text
Type:               |Number|
Available values:   `0`, `1`
Default value:      `0`

Note: the initial generation of syntax files, which occurs on the first Vim
restart after enabling this option, requires up to 5 seconds to complete.


text
*g:everforest_colors_override*

g:everforest_colors_override~

Override color palette. The available keys can be found in
/path/to/everforest/autoload/everforest.vim.

E.g.

text
let g:everforest_colors_override = {'bg0': ['#202020', '234'], 'bg2': ['#282828', '235']}
colorscheme everforest

<
Type: |Dictionary|
Default value: {}

==============================================================================
FAQ everforest-faq


The colors don't match those in the screenshots.~

  1. This color scheme is mainly designed for true colors, set termguicolors
    is required. Check output of vim --version, maybe your Vim doesn't support
    termguicolors, such as the Vim version that comes with macOS.

  2. Maybe your terminal emulator doesn't support true colors, you can test it
    using this script.

  3. If you are running vim in tmux, you need to override default true colors of
    tmux, as tmux cannot display true colors properly:
    #1246 How to use true colors in vim under tmux?


The configuration options don't work.~

You should place them before colorscheme everforest .


A lot of errors are detected if I install with pack feature.~

You'll need to add packadd! everforest before applying this color scheme.
Check sainnhe/gruvbox-material#60


How to enable cursive italic keywords?~

  1. Install a font that supports cursive italics, for example https://aka.sainnhe.dev/fonts

  2. Enable italic keywords in this color scheme: let g:everforest_enable_italic = 1

  3. (Optional) Disable italic comment: let g:everforest_disable_italic_comment = 1


The comment color looks weird.~

Some terminal emulators don't support italics, which may cause the comment
color looks weird. See https://github.com/sainnhe/gruvbox-material/issues/5#issuecomment-729586348

A temporary solution is to disable italic comments via
|g:everforest_disable_italic_comment|.

If you are using tmux, you may also need to override default true colors of
tmux: https://github.com/tmux/tmux/issues/1246


How to use custom colors?~

text
function! s:everforest_custom() abort
  " Link a highlight group to a predefined highlight group.
  " See `colors/everforest.vim` for all predefined highlight groups.
  highlight! link groupA groupB
  highlight! link groupC groupD

  " Initialize the color palette.
  " The first parameter is a valid value for `g:everforest_background`,
  " and the second parameter is a valid value for `g:everforest_colors_override`.
  let l:palette = everforest#get_palette('medium', {})
  " Define a highlight group.
  " The first parameter is the name of a highlight group,
  " the second parameter is the foreground color,
  " the third parameter is the background color,
  " the fourth parameter is for UI highlighting which is optional,
  " and the last parameter is for `guisp` which is also optional.
  " See `autoload/everforest.vim` for the format of `l:palette`.
  call everforest#highlight('groupE', l:palette.red, l:palette.none, 'undercurl', l:palette.red)
endfunction

augroup EverforestCustom
  autocmd!
  autocmd ColorScheme everforest call s:everforest_custom()
augroup END

colorscheme everforest

<
Or in Neovim (Lua configuration):

text
vim.api.nvim_create_autocmd('ColorScheme', {
  group = vim.api.nvim_create_augroup('custom_highlights_everforest', {}),
  pattern = 'everforest',
  callback = function()
    local config = vim.fn['everforest#get_configuration']()
    local palette = vim.fn['everforest#get_palette'](config.background, config.colors_override)
    local set_hl = vim.fn['everforest#highlight']

    set_hl('Search', palette.none, palette.bg_visual_yellow)
    set_hl('IncSearch', palette.none, palette.bg_visual_red)
  end
})

<
Note: Make sure to define the augroup before calling colorscheme.


What's your status line configuration?~

See this post: https://aka.sainnhe.dev/statusline


What's the font used here?~

See this post: https://aka.sainnhe.dev/fonts

==============================================================================
vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:et:sw=4:fen:fdm=marker:fmr={{{,}}}:


--- METRICS ---