add everforest colorshceme
This commit is contained in:
@@ -0,0 +1,291 @@
|
||||
" =============================================================================
|
||||
" URL: https://github.com/sainnhe/everforest
|
||||
" Filename: autoload/everforest.vim
|
||||
" Author: sainnhe
|
||||
" Email: sainnhe@gmail.com
|
||||
" License: MIT License
|
||||
" =============================================================================
|
||||
|
||||
function! everforest#get_configuration() "{{{
|
||||
return {
|
||||
\ 'background': get(g:, 'everforest_background', 'medium'),
|
||||
\ 'transparent_background': get(g:, 'everforest_transparent_background', 0),
|
||||
\ 'disable_italic_comment': get(g:, 'everforest_disable_italic_comment', 0),
|
||||
\ 'enable_italic': get(g:, 'everforest_enable_italic', 0),
|
||||
\ 'cursor': get(g:, 'everforest_cursor', 'auto'),
|
||||
\ 'menu_selection_background': get(g:, 'everforest_menu_selection_background', 'white'),
|
||||
\ 'sign_column_background': get(g:, 'everforest_sign_column_background', 'default'),
|
||||
\ 'spell_foreground': get(g:, 'everforest_spell_foreground', 'none'),
|
||||
\ 'ui_contrast': get(g:, 'everforest_ui_contrast', 'low'),
|
||||
\ 'show_eob': get(g:, 'everforest_show_eob', 1),
|
||||
\ 'current_word': get(g:, 'everforest_current_word', get(g:, 'everforest_transparent_background', 0) == 0 ? 'grey background' : 'bold'),
|
||||
\ 'lightline_disable_bold': get(g:, 'everforest_lightline_disable_bold', 0),
|
||||
\ 'diagnostic_text_highlight': get(g:, 'everforest_diagnostic_text_highlight', 0),
|
||||
\ 'diagnostic_line_highlight': get(g:, 'everforest_diagnostic_line_highlight', 0),
|
||||
\ 'diagnostic_virtual_text': get(g:, 'everforest_diagnostic_virtual_text', 'grey'),
|
||||
\ 'disable_terminal_colors': get(g:, 'everforest_disable_terminal_colors', 0),
|
||||
\ 'better_performance': get(g:, 'everforest_better_performance', 0),
|
||||
\ 'colors_override': get(g:, 'everforest_colors_override', {}),
|
||||
\ }
|
||||
endfunction "}}}
|
||||
function! everforest#get_palette(background, colors_override) "{{{
|
||||
if a:background ==# 'hard' "{{{
|
||||
if &background ==# 'dark'
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#2b3339', '235'],
|
||||
\ 'bg1': ['#323c41', '236'],
|
||||
\ 'bg2': ['#3a454a', '237'],
|
||||
\ 'bg3': ['#445055', '238'],
|
||||
\ 'bg4': ['#4c555b', '239'],
|
||||
\ 'bg5': ['#53605c', '240'],
|
||||
\ 'bg_visual': ['#503946', '52'],
|
||||
\ 'bg_red': ['#4e3e43', '52'],
|
||||
\ 'bg_green': ['#404d44', '22'],
|
||||
\ 'bg_blue': ['#394f5a', '17'],
|
||||
\ 'bg_yellow': ['#4a4940', '136'],
|
||||
\ }
|
||||
else
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#fff9e8', '230'],
|
||||
\ 'bg1': ['#f7f4e0', '228'],
|
||||
\ 'bg2': ['#f0eed9', '223'],
|
||||
\ 'bg3': ['#e9e8d2', '223'],
|
||||
\ 'bg4': ['#e1ddcb', '223'],
|
||||
\ 'bg5': ['#bec5b2', '223'],
|
||||
\ 'bg_visual': ['#edf0cd', '194'],
|
||||
\ 'bg_red': ['#fce5dc', '217'],
|
||||
\ 'bg_green': ['#f1f3d4', '194'],
|
||||
\ 'bg_blue': ['#eaf2eb', '117'],
|
||||
\ 'bg_yellow': ['#fbefd0', '226'],
|
||||
\ }
|
||||
endif "}}}
|
||||
elseif a:background ==# 'medium' "{{{
|
||||
if &background ==# 'dark'
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#2f383e', '235'],
|
||||
\ 'bg1': ['#374247', '236'],
|
||||
\ 'bg2': ['#404c51', '237'],
|
||||
\ 'bg3': ['#4a555b', '238'],
|
||||
\ 'bg4': ['#525c62', '239'],
|
||||
\ 'bg5': ['#596763', '240'],
|
||||
\ 'bg_visual': ['#573e4c', '52'],
|
||||
\ 'bg_red': ['#544247', '52'],
|
||||
\ 'bg_green': ['#445349', '22'],
|
||||
\ 'bg_blue': ['#3b5360', '17'],
|
||||
\ 'bg_yellow': ['#504f45', '136'],
|
||||
\ }
|
||||
else
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#fdf6e3', '230'],
|
||||
\ 'bg1': ['#f3efda', '228'],
|
||||
\ 'bg2': ['#edead5', '223'],
|
||||
\ 'bg3': ['#e4e1cd', '223'],
|
||||
\ 'bg4': ['#dfdbc8', '223'],
|
||||
\ 'bg5': ['#bdc3af', '223'],
|
||||
\ 'bg_visual': ['#eaedc8', '194'],
|
||||
\ 'bg_red': ['#fbe3da', '217'],
|
||||
\ 'bg_green': ['#f0f1d2', '194'],
|
||||
\ 'bg_blue': ['#e9f0e9', '117'],
|
||||
\ 'bg_yellow': ['#faedcd', '226'],
|
||||
\ }
|
||||
endif "}}}
|
||||
else "{{{
|
||||
if &background ==# 'dark'
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#323d43', '235'],
|
||||
\ 'bg1': ['#3c474d', '236'],
|
||||
\ 'bg2': ['#465258', '237'],
|
||||
\ 'bg3': ['#505a60', '238'],
|
||||
\ 'bg4': ['#576268', '239'],
|
||||
\ 'bg5': ['#5f6d67', '240'],
|
||||
\ 'bg_visual': ['#5d4251', '52'],
|
||||
\ 'bg_red': ['#59454b', '52'],
|
||||
\ 'bg_green': ['#48584d', '22'],
|
||||
\ 'bg_blue': ['#3d5665', '17'],
|
||||
\ 'bg_yellow': ['#55544a', '136'],
|
||||
\ }
|
||||
else
|
||||
let palette1 = {
|
||||
\ 'bg0': ['#f8f0dc', '230'],
|
||||
\ 'bg1': ['#efead4', '228'],
|
||||
\ 'bg2': ['#e9e5cf', '223'],
|
||||
\ 'bg3': ['#e1ddc9', '223'],
|
||||
\ 'bg4': ['#dcd8c4', '223'],
|
||||
\ 'bg5': ['#b9c0ab', '223'],
|
||||
\ 'bg_visual': ['#e6e9c4', '194'],
|
||||
\ 'bg_red': ['#f9e0d4', '217'],
|
||||
\ 'bg_green': ['#edeece', '194'],
|
||||
\ 'bg_blue': ['#e7ede5', '117'],
|
||||
\ 'bg_yellow': ['#f6e9c9', '226'],
|
||||
\ }
|
||||
endif
|
||||
endif "}}}
|
||||
if &background ==# 'dark' "{{{
|
||||
let palette2 = {
|
||||
\ 'fg': ['#d3c6aa', '223'],
|
||||
\ 'red': ['#e67e80', '167'],
|
||||
\ 'orange': ['#e69875', '208'],
|
||||
\ 'yellow': ['#dbbc7f', '214'],
|
||||
\ 'green': ['#a7c080', '142'],
|
||||
\ 'aqua': ['#83c092', '108'],
|
||||
\ 'blue': ['#7fbbb3', '109'],
|
||||
\ 'purple': ['#d699b6', '175'],
|
||||
\ 'grey0': ['#7a8478', '243'],
|
||||
\ 'grey1': ['#859289', '245'],
|
||||
\ 'grey2': ['#9da9a0', '247'],
|
||||
\ 'statusline1':['#a7c080', '142'],
|
||||
\ 'statusline2':['#d3c6aa', '223'],
|
||||
\ 'statusline3':['#e67e80', '167'],
|
||||
\ 'none': ['NONE', 'NONE']
|
||||
\ } "}}}
|
||||
else "{{{
|
||||
let palette2 = {
|
||||
\ 'fg': ['#5c6a72', '242'],
|
||||
\ 'red': ['#f85552', '160'],
|
||||
\ 'orange': ['#f57d26', '116'],
|
||||
\ 'yellow': ['#dfa000', '136'],
|
||||
\ 'green': ['#8da101', '106'],
|
||||
\ 'aqua': ['#35a77c', '37'],
|
||||
\ 'blue': ['#3a94c5', '32'],
|
||||
\ 'purple': ['#df69ba', '162'],
|
||||
\ 'grey0': ['#a6b0a0', '247'],
|
||||
\ 'grey1': ['#939f91', '247'],
|
||||
\ 'grey2': ['#829181', '247'],
|
||||
\ 'statusline1':['#93b259', '106'],
|
||||
\ 'statusline2':['#708089', '242'],
|
||||
\ 'statusline3':['#e66868', '160'],
|
||||
\ 'none': ['NONE', 'NONE']
|
||||
\ }
|
||||
endif "}}}
|
||||
return extend(extend(palette1, palette2), a:colors_override)
|
||||
endfunction "}}}
|
||||
function! everforest#highlight(group, fg, bg, ...) "{{{
|
||||
execute 'highlight' a:group
|
||||
\ 'guifg=' . a:fg[0]
|
||||
\ 'guibg=' . a:bg[0]
|
||||
\ 'ctermfg=' . a:fg[1]
|
||||
\ 'ctermbg=' . a:bg[1]
|
||||
\ 'gui=' . (a:0 >= 1 ?
|
||||
\ a:1 :
|
||||
\ 'NONE')
|
||||
\ 'cterm=' . (a:0 >= 1 ?
|
||||
\ a:1 :
|
||||
\ 'NONE')
|
||||
\ 'guisp=' . (a:0 >= 2 ?
|
||||
\ a:2[0] :
|
||||
\ 'NONE')
|
||||
endfunction "}}}
|
||||
function! everforest#syn_gen(path, last_modified, msg) "{{{
|
||||
" Generate the `after/syntax` directory.
|
||||
let full_content = join(readfile(a:path), "\n") " Get the content of `colors/everforest.vim`
|
||||
let syn_conent = []
|
||||
let rootpath = everforest#syn_rootpath(a:path) " Get the path to place the `after/syntax` directory.
|
||||
call substitute(full_content, '" syn_begin.\{-}syn_end', '\=add(syn_conent, submatch(0))', 'g') " Search for 'syn_begin.\{-}syn_end' (non-greedy) and put all the search results into a list.
|
||||
for content in syn_conent
|
||||
let syn_list = []
|
||||
call substitute(matchstr(matchstr(content, 'syn_begin:.\{-}{{{'), ':.\{-}{{{'), '\(\w\|-\)\+', '\=add(syn_list, submatch(0))', 'g') " Get the file types. }}}}}}
|
||||
for syn in syn_list
|
||||
call everforest#syn_write(rootpath, syn, content) " Write the content.
|
||||
endfor
|
||||
endfor
|
||||
call everforest#syn_write(rootpath, 'text', "let g:everforest_last_modified = '" . a:last_modified . "'") " Write the last modified time to `after/syntax/text/everforest.vim`
|
||||
let syntax_relative_path = has('win32') ? '\after\syntax' : '/after/syntax'
|
||||
if a:msg ==# 'update'
|
||||
echohl WarningMsg | echom '[everforest] Updated ' . rootpath . syntax_relative_path | echohl None
|
||||
call everforest#ftplugin_detect(a:path)
|
||||
else
|
||||
echohl WarningMsg | echom '[everforest] Generated ' . rootpath . syntax_relative_path | echohl None
|
||||
execute 'set runtimepath+=' . fnamemodify(rootpath, ':p') . 'after'
|
||||
endif
|
||||
endfunction "}}}
|
||||
function! everforest#syn_write(rootpath, syn, content) "{{{
|
||||
" Write the content.
|
||||
let syn_path = a:rootpath . '/after/syntax/' . a:syn . '/everforest.vim' " The path of a syntax file.
|
||||
" create a new file if it doesn't exist
|
||||
if !filereadable(syn_path)
|
||||
call mkdir(a:rootpath . '/after/syntax/' . a:syn, 'p')
|
||||
call writefile([
|
||||
\ "if !exists('g:colors_name') || g:colors_name !=# 'everforest'",
|
||||
\ ' finish',
|
||||
\ 'endif'
|
||||
\ ], syn_path, 'a') " Abort if the current color scheme is not everforest.
|
||||
call writefile([
|
||||
\ "if index(g:everforest_loaded_file_types, '" . a:syn . "') ==# -1",
|
||||
\ " call add(g:everforest_loaded_file_types, '" . a:syn . "')",
|
||||
\ 'else',
|
||||
\ ' finish',
|
||||
\ 'endif'
|
||||
\ ], syn_path, 'a') " Abort if this file type has already been loaded.
|
||||
endif
|
||||
" If there is something like `call everforest#highlight()`, then add
|
||||
" code to initialize the palette and configuration.
|
||||
if matchstr(a:content, 'everforest#highlight') !=# ''
|
||||
call writefile([
|
||||
\ 'let s:configuration = everforest#get_configuration()',
|
||||
\ 'let s:palette = everforest#get_palette(s:configuration.background, s:configuration.colors_override)'
|
||||
\ ], syn_path, 'a')
|
||||
endif
|
||||
" Append the content.
|
||||
call writefile(split(a:content, "\n"), syn_path, 'a')
|
||||
" Add modeline.
|
||||
call writefile(['" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker fmr={{{,}}}:'], syn_path, 'a')
|
||||
endfunction "}}}
|
||||
function! everforest#syn_rootpath(path) "{{{
|
||||
" Get the directory where `after/syntax` is generated.
|
||||
if (matchstr(a:path, '^/usr/share') ==# '') " Return the plugin directory. The `after/syntax` directory should never be generated in `/usr/share`, even if you are a root user.
|
||||
return fnamemodify(a:path, ':p:h:h')
|
||||
else " Use vim home directory.
|
||||
if has('nvim')
|
||||
return stdpath('config')
|
||||
else
|
||||
return expand('~') . '/.vim'
|
||||
endif
|
||||
endif
|
||||
endfunction "}}}
|
||||
function! everforest#syn_newest(path, last_modified) "{{{
|
||||
" Determine whether the current syntax files are up to date by comparing the last modified time in `colors/everforest.vim` and `after/syntax/text/everforest.vim`.
|
||||
let rootpath = everforest#syn_rootpath(a:path)
|
||||
execute 'source ' . rootpath . '/after/syntax/text/everforest.vim'
|
||||
return a:last_modified ==# g:everforest_last_modified ? 1 : 0
|
||||
endfunction "}}}
|
||||
function! everforest#syn_clean(path, msg) "{{{
|
||||
" Clean the `after/syntax` directory.
|
||||
let rootpath = everforest#syn_rootpath(a:path)
|
||||
" Remove `after/syntax/**/everforest.vim`.
|
||||
let file_list = split(globpath(rootpath, 'after/syntax/**/everforest.vim'), "\n")
|
||||
for file in file_list
|
||||
call delete(file)
|
||||
endfor
|
||||
" Remove empty directories.
|
||||
let dir_list = split(globpath(rootpath, 'after/syntax/*'), "\n")
|
||||
for dir in dir_list
|
||||
if globpath(dir, '*') ==# ''
|
||||
call delete(dir, 'd')
|
||||
endif
|
||||
endfor
|
||||
if globpath(rootpath . '/after/syntax', '*') ==# ''
|
||||
call delete(rootpath . '/after/syntax', 'd')
|
||||
endif
|
||||
if globpath(rootpath . '/after', '*') ==# ''
|
||||
call delete(rootpath . '/after', 'd')
|
||||
endif
|
||||
if a:msg
|
||||
let syntax_relative_path = has('win32') ? '\after\syntax' : '/after/syntax'
|
||||
echohl WarningMsg | echom '[everforest] Cleaned ' . rootpath . syntax_relative_path | echohl None
|
||||
endif
|
||||
endfunction "}}}
|
||||
function! everforest#syn_exists(path) "{{{
|
||||
return filereadable(everforest#syn_rootpath(a:path) . '/after/syntax/text/everforest.vim')
|
||||
endfunction "}}}
|
||||
function! everforest#ftplugin_detect(path) "{{{
|
||||
" Check if /after/ftplugin exists.
|
||||
" This directory is generated in earlier versions, users may need to manually clean it.
|
||||
let rootpath = everforest#syn_rootpath(a:path)
|
||||
if filereadable(everforest#syn_rootpath(a:path) . '/after/ftplugin/text/everforest.vim')
|
||||
let ftplugin_relative_path = has('win32') ? '\after\ftplugin' : '/after/ftplugin'
|
||||
echohl WarningMsg | echom '[everforest] Detected ' . rootpath . ftplugin_relative_path | echohl None
|
||||
echohl WarningMsg | echom '[everforest] This directory is no longer used, you may need to manually delete it.' | echohl None
|
||||
endif
|
||||
endfunction "}}}
|
||||
|
||||
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker fmr={{{,}}}:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,537 @@
|
||||
*everforest.txt* Comfortable & Pleasant Color Scheme for Vim
|
||||
*everforest*
|
||||
>
|
||||
______ ____ __
|
||||
/ ____/ _____ _____/ __/___ ________ _____/ /_
|
||||
/ __/ | | / / _ \/ ___/ /_/ __ \/ ___/ _ \/ ___/ __/
|
||||
/ /___ | |/ / __/ / / __/ /_/ / / / __(__ ) /_
|
||||
/_____/ |___/\___/_/ /_/ \____/_/ \___/____/\__/
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
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](https://github.com/jonls/redshift) and [f.lux](https://justgetflux.com).
|
||||
- Customizable.
|
||||
- Rich support for common file types and plugins.
|
||||
- Tree-sitter support.
|
||||
- Semantic highlighting support.
|
||||
- Italic support 🎉
|
||||
|
||||
==============================================================================
|
||||
INSTALLATION *everforest-installation*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Via Plugin Manager~
|
||||
|
||||
Take [vim-plug](https://github.com/junegunn/vim-plug) for example:
|
||||
>
|
||||
Plug 'sainnhe/everforest'
|
||||
<
|
||||
For better syntax highlighting support, please install
|
||||
https://github.com/sheerun/vim-polyglot or https://github.com/nvim-treesitter/nvim-treesitter.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Via Pack Feature~
|
||||
|
||||
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`, you still need to add `packadd! everforest` to your vimrc. [sainnhe/gruvbox-material#60](https://github.com/sainnhe/gruvbox-material/issues/60)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Manually~
|
||||
|
||||
1. Clone the repository: `git clone --depth 1 https://github.com/sainnhe/everforest.git`
|
||||
|
||||
2. Copy `/path/to/everforest/autoload/everforest.vim` to
|
||||
`~/.vim/autoload/` .
|
||||
|
||||
3. Copy `/path/to/everforest/colors/everforest.vim` to
|
||||
`~/.vim/colors/` .
|
||||
|
||||
4. Copy `/path/to/everforest/doc/everforest.txt` to
|
||||
`~/.vim/doc/` and execute `:helptags ~/.vim/doc/` to generate help tags.
|
||||
|
||||
5. To install [airline](https://github.com/vim-airline/vim-airline) theme,
|
||||
copy `/path/to/everforest/autoload/airline/themes/everforest.vim`
|
||||
to `~/.vim/autoload/airline/themes/` .
|
||||
|
||||
6. To install [lightline](https://github.com/itchyny/lightline.vim) theme,
|
||||
copy `/path/to/everforest/autoload/lightline/colorscheme/everforest.vim`
|
||||
to `~/.vim/autoload/lightline/colorscheme/` .
|
||||
|
||||
7. To install [lualine](https://github.com/nvim-lualine/lualine.nvim) theme,
|
||||
copy `/path/to/everforest/lua/lualine/themes/everforest.lua`
|
||||
to `~/.config/nvim/lua/lualine/themes/` .
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
AUR~
|
||||
|
||||
There are some packages available for Arch Linux users in AUR:
|
||||
|
||||
- [vim-everforest-git](https://aur.archlinux.org/pkgbase/vim-everforest-git/)
|
||||
- [neovim-everforest-git](https://aur.archlinux.org/pkgbase/neovim-everforest-git/)
|
||||
|
||||
==============================================================================
|
||||
USAGE *everforest-usage*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Vim~
|
||||
|
||||
Put something like this in your vimrc:
|
||||
>
|
||||
" 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.
|
||||
|
||||
If you want to apply this color scheme temporarily, run this command in
|
||||
vim(this may cause broken colors):
|
||||
>
|
||||
:colorscheme everforest
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Airline~
|
||||
|
||||
To enable [airline](https://github.com/vim-airline/vim-airline) color
|
||||
scheme, put this in your vimrc:
|
||||
>
|
||||
let g:airline_theme = 'everforest'
|
||||
<
|
||||
To apply it without reloading:
|
||||
>
|
||||
:AirlineTheme everforest
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Lightline~
|
||||
|
||||
To enable [lightline](https://github.com/itchyny/lightline.vim) color
|
||||
scheme, put this in your vimrc:
|
||||
>
|
||||
let g:lightline = {}
|
||||
let g:lightline.colorscheme = 'everforest'
|
||||
|
||||
" Or this line:
|
||||
let g:lightline = {'colorscheme' : 'everforest'}
|
||||
<
|
||||
To apply it without reloading:
|
||||
>
|
||||
:let g:lightline.colorscheme = 'everforest'
|
||||
:call lightline#init()
|
||||
:call lightline#colorscheme()
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Lualine~
|
||||
|
||||
To enable [lualine](https://github.com/nvim-lualine/lualine.nvim) color
|
||||
scheme, put this in your init.lua:
|
||||
>
|
||||
require'lualine'.setup {
|
||||
options = {
|
||||
theme = 'everforest'
|
||||
}
|
||||
}
|
||||
<
|
||||
To apply it without reloading:
|
||||
>
|
||||
:lua require'lualine'.setup {options = {theme = 'everforest'}}
|
||||
<
|
||||
==============================================================================
|
||||
CONFIGURATION *everforest-configuration*
|
||||
|
||||
Note: the configuration options should be placed before `colorscheme everforest`
|
||||
|
||||
E.g.
|
||||
>
|
||||
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'
|
||||
<
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_background*
|
||||
g:everforest_background~
|
||||
|
||||
The background contrast used in this color scheme.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'hard'`, `'medium'`, `'soft'`
|
||||
Default value: `'medium'`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_enable_italic*
|
||||
g:everforest_enable_italic~
|
||||
|
||||
To enable italic in this color scheme, set this option to `1`.
|
||||
|
||||
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.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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`.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_cursor*
|
||||
g:everforest_cursor~
|
||||
|
||||
Customize the cursor color, only works in GUI clients.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'auto'`, `'red'`, `'orange'`, `'yellow'`, `'green'`,
|
||||
`'aqua'`, `'blue'`, `'purple'`
|
||||
Default value: `'auto'`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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`.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`, `2`
|
||||
Default value: `0`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_sign_column_background*
|
||||
g:everforest_sign_column_background~
|
||||
|
||||
By default, the background color of sign column is different from normal text.
|
||||
If you want to make it the same as normal text, set this option to `'none'`.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'default'`, `'none'`
|
||||
Default value: `'default'`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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'`.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'none'`, `'colored'`
|
||||
Default value: `'none'`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_ui_contrast*
|
||||
g:everforest_ui_contrast~
|
||||
|
||||
The contrast of line numbers, indent lines, etc.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'low'`, `'high'`
|
||||
Default value: `'low'`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_show_eob*
|
||||
g:everforest_show_eob~
|
||||
|
||||
Whether to show |hl-EndOfBuffer|.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `1`, `0`
|
||||
Default value: `1`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
Currently, the following plugins are supported:
|
||||
|
||||
- neovim's built-in language server client
|
||||
- https://github.com/neoclide/coc.nvim
|
||||
- https://github.com/prabirshrestha/vim-lsp
|
||||
- https://github.com/ycm-core/YouCompleteMe
|
||||
- https://github.com/dense-analysis/ale
|
||||
- https://github.com/neomake/neomake
|
||||
- https://github.com/vim-syntastic/syntastic
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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`.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
Currently, the following plugins are supported:
|
||||
|
||||
- https://github.com/neoclide/coc.nvim
|
||||
- https://github.com/ycm-core/YouCompleteMe
|
||||
- https://github.com/dense-analysis/ale
|
||||
- https://github.com/vim-syntastic/syntastic
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_diagnostic_virtual_text*
|
||||
g:everforest_diagnostic_virtual_text~
|
||||
|
||||
Some plugins can use virtual text feature of neovim to display
|
||||
error/warning/info/hint information, you can use this option to adjust the
|
||||
colors of it.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'grey'`, `'colored'`
|
||||
Default value: `'grey'`
|
||||
|
||||
Currently, the following plugins are supported:
|
||||
|
||||
- neovim's built-in language server client
|
||||
- https://github.com/neoclide/coc.nvim
|
||||
- https://github.com/prabirshrestha/vim-lsp
|
||||
- https://github.com/dense-analysis/ale
|
||||
- https://github.com/neomake/neomake
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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.
|
||||
|
||||
Type: |String|
|
||||
Available values: `'grey background'`, `'bold'`, `'underline'`, `'italic'`
|
||||
Default value: `'grey background'` when not in transparent mode, `'bold'`
|
||||
when in transparent mode.
|
||||
|
||||
Currently, the following plugins are supported:
|
||||
|
||||
- https://github.com/neoclide/coc-highlight
|
||||
- https://github.com/dominikduda/vim_current_word
|
||||
- https://github.com/RRethy/vim-illuminate
|
||||
- https://github.com/itchyny/vim-cursorword
|
||||
- https://github.com/prabirshrestha/vim-lsp
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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`.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
Note: this configuration option doesn't need to be placed before `colorscheme everforest`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*g:everforest_better_performance*
|
||||
g:everforest_better_performance~
|
||||
|
||||
The loading time of this color scheme is very long because too many file types
|
||||
and plugins are optimized. This feature 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%.
|
||||
|
||||
Type: |Number|
|
||||
Available values: `0`, `1`
|
||||
Default value: `0`
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*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.
|
||||
|
||||
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`.
|
||||
|
||||
2. Maybe your terminal emulator doesn't support true colors, you can test it
|
||||
using [this script](https://unix.stackexchange.com/questions/404414/print-true-color-24-bit-test-pattern).
|
||||
|
||||
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?](https://github.com/tmux/tmux/issues/1246)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
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](https://github.com/sainnhe/gruvbox-material/issues/60)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
How to enable cursive italic keywords?~
|
||||
|
||||
1. Install a font that supports cursive italics, for example https://www.sainnhe.dev/post/patch-fonts-with-cursive-italic-styles/
|
||||
|
||||
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
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
How to use custom colors?~
|
||||
>
|
||||
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
|
||||
<
|
||||
Note: Make sure to define the `augroup` before declare the `colorscheme`.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
What's your status line configuration?~
|
||||
|
||||
See this [article](https://www.sainnhe.dev/post/status-line-config/).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
What's the font used here?~
|
||||
|
||||
See https://www.sainnhe.dev/post/patch-fonts-with-cursive-italic-styles/
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:nosta:noet:ts=8:sts=0:ft=help:et:sw=4:fen:fdm=marker:fmr={{{,}}}:
|
||||
Reference in New Issue
Block a user