Skip to content

ecvilily/gruvbox-material

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

253 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ƒ๐š๐ซ๐ค

๐Ž๐ซ๐ข๐ ๐ข๐ง๐š๐ฅ ๐†๐ซ๐ฎ๐ฏ๐›๐จ๐ฑ ๐†๐ซ๐ฎ๐ฏ๐›๐จ๐ฑ ๐Œ๐š๐ญ๐ž๐ซ๐ข๐š๐ฅ
๐’‰๐’‚๐’“๐’… original-hard-dark material-hard-dark
๐’Ž๐’†๐’…๐’Š๐’–๐’Ž original-medium-dark material-medium-dark
๐’”๐’๐’‡๐’• original-soft-dark material-soft-dark

๐‹๐ข๐ ๐ก๐ญ

๐Ž๐ซ๐ข๐ ๐ข๐ง๐š๐ฅ ๐†๐ซ๐ฎ๐ฏ๐›๐จ๐ฑ ๐†๐ซ๐ฎ๐ฏ๐›๐จ๐ฑ ๐Œ๐š๐ญ๐ž๐ซ๐ข๐š๐ฅ
๐’‰๐’‚๐’“๐’… original-hard-light material-hard-light
๐’Ž๐’†๐’…๐’Š๐’–๐’Ž original-medium-light material-medium-light
๐’”๐’๐’‡๐’• original-soft-light material-soft-light

In my opinion, the very first thing a color scheme should do is to be eye-friendly, anything else is secondary. This requires soft contrast and low blue light.

Gruvbox Material is based on Gruvbox, but with a very different color palette, I'm trying to adjust the foreground colors to match these requirements.

The syntax highlighting logic used in this branch is almost the same as the original gruvbox. In addition, I've developed neosyn branch that uses another syntax highlighting logic, and it has also been optimized for common file types and plugins.

Installation

Via Plugin Manager

Take vim-plug for example:

Plug 'sainnhe/gruvbox-material'

For better syntax highlighting support, please install sheerun/vim-polyglot.

Manually

  1. Clone this repository.
  2. Copy /path/to/gruvbox-material/colors/gruvbox-material.vim to ~/.vim/colors/ .
  3. Copy /path/to/gruvbox-material/doc/gruvbox-material.txt to ~/.vim/doc/ and execute :helptags ~/.vim/doc/ to generate help tags.
  4. To install airline theme, copy /path/to/gruvbox-material/autoload/airline/themes/gruvbox_material.vim to ~/.vim/autoload/airline/themes/gruvbox_material.vim .
  5. To install lightline theme, copy /path/to/gruvbox-material/autoload/lightline/colorscheme/gruvbox_material.vim to ~/.vim/autoload/lightline/colorscheme/gruvbox_material.vim .

AUR

There is a package available for Arch Linux users in AUR: gruvbox-material-git

Usage

Vim

Put something like this in your vimrc:

" if you don't set this option, this color scheme will fall back to the original gruvbox
set termguicolors

" for dark version
set background=dark

" for light version
set background=light

" set contrast
" this configuration option should be placed before `colorscheme gruvbox-material`
" available values: 'hard', 'medium'(default), 'soft'
let g:gruvbox_material_background = 'soft'

colorscheme gruvbox-material

See :help gruvbox-material-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 gruvbox-material

Airline

To enable airline color scheme, put this in your vimrc:

let g:airline_theme = 'gruvbox_material'

To apply it without reloading:

:AirlineTheme gruvbox_material

Lightline

To enable lightline color scheme, put this in your vimrc:

let g:lightline = {}
let g:lightline.colorscheme = 'gruvbox_material'

" or this line
let g:lightline = {'colorscheme' : 'gruvbox_material'}

To apply it without reloading:

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

FAQ

Q: It doesn't work as expected.

A:

  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.

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

  4. There are many highlight group links in syntax files while a color scheme may change them, enabling one color scheme based on another color scheme enabled is very likely to cause colors to break. If any color is broken, you can enable the color scheme in your vimrc instead of after vim startup.

Q: What's your status line configuration?

A: Check this gist.

Q: What's the font used here?

A: Fira Code Nerd Font.

Contribution

Check this gist for detailed instructions to hack this color scheme: hack-color-schemes.md

Related Projects

Color reference: dark, light

Note: The following projects are sorted by alphabet.

Code Editor

Terminal Emulators

Other

Inspirations

License

MIT && Anti-996

About

Gruvbox with Material Palette

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Vim Script 99.9%
  • Shell 0.1%