Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luisiacc/gruvbox-baby

Gruvbox theme for neovim with full πŸŽ„TreeSitter support.
https://github.com/luisiacc/gruvbox-baby

awesome awesome-neovim gruvbox gruvbox-color-scheme gruvbox-dark gruvbox-reboot gruvbox-remake neovim neovim-colorscheme neovim-lua-plugin neovim-theme vim vim-colorscheme vim-theme

Last synced: 10 days ago
JSON representation

Gruvbox theme for neovim with full πŸŽ„TreeSitter support.

Awesome Lists containing this project

README

        

![logo](https://user-images.githubusercontent.com/31720261/156893394-a14a7fee-749c-4d02-8bfd-1a4cb2c479dd.png)

# πŸŽ„ Gruvbox baby!

My variation of the gruvbox theme with full support for treesitter!

## πŸ€” Why?

I wasn't comfortable with the gruvbox themes out there, either they didn't have good treesitter support or if they do, I
didn't like their colors on python and javascript/typescript files.

## πŸ“Έ Pretty pictures

Font: **Jetbrains Mono patched with nerd fonts**

Terminal: wezterm https://github.com/wez/wezterm

#### πŸŒ™ Lua

![lua-example](https://user-images.githubusercontent.com/31720261/147399333-5dc8d3dc-b382-4f13-a047-fb99298af028.png)

#### 🐍 Python

![python-example](https://user-images.githubusercontent.com/31720261/147399558-bf00b60a-aea9-46f7-a823-fc760cda05be.png)

#### βš›οΈ React with typescript

![react-typescript-example](https://user-images.githubusercontent.com/31720261/147399581-66030749-3fa2-466d-aa8a-e79b6181185c.png)

#### πŸ” Telescope

_inspired by https://github.com/NvChad/NvChad (You have to enable it via config variable)_
![telescope-theme](https://user-images.githubusercontent.com/31720261/151669762-1470aa12-b6ff-47c1-a4e9-ec9b37e0eabe.png)

## βš™οΈ Installation

```vim
Plug 'luisiacc/gruvbox-baby', {'branch': 'main'}
...
colorscheme gruvbox-baby
```

## πŸͺ› Configuration

> ❗️ configuration needs to be set **BEFORE** loading the color scheme with `colorscheme gruvbox-baby`

| Option | Default | Available options |
| -------------------- | ----------- | ------------------------------------------------ |
| background_color | `medium` | `medium`, `dark` |
| transparent_mode | `false` | `false`, `true` - sets background colors to None |
| comment_style | `italic` | see `:h attr-list` |
| keyword_style | `italic` | see `:h attr-list` |
| string_style | `nocombine` | see `:h attr-list` |
| function_style | `bold` | see `:h attr-list` |
| variable_style | `NONE` | see `:h attr-list` |
| highlights | `{}` | override highlights with your custom highlights |
| color_overrides | `{}` | override color palette with your custom colors |
| use_original_palette | `false` | use the original gruvbox palette |

```lua
-- Example config in Lua
vim.g.gruvbox_baby_function_style = "NONE"
vim.g.gruvbox_baby_keyword_style = "italic"

-- Each highlight group must follow the structure:
-- ColorGroup = {fg = "foreground color", bg = "background_color", style = "some_style(:h attr-list)"}
-- See also :h highlight-guifg
-- Example:
vim.g.gruvbox_baby_highlights = {Normal = {fg = "#123123", bg = "NONE", style="underline"}}

-- Enable telescope theme
vim.g.gruvbox_baby_telescope_theme = 1

-- Enable transparent mode
vim.g.gruvbox_baby_transparent_mode = 1

-- Load the colorscheme
vim.cmd[[colorscheme gruvbox-baby]]
```

If you enable the telescope theme, I recommend using it with this borderchars config:

```lua
telescope.setup({
defaults = {
...
borderchars = {
prompt = { "─", " ", " ", " ", "─", "─", " ", " " },
results = { " " },
preview = { " " },
},
}
})
```

```vim
" Example config in VimScript
let g:gruvbox_baby_function_style = "NONE"
let g:gruvbox_baby_keyword_style = "italic"

" Enable telescope theme
let g:gruvbox_baby_telescope_theme = 1

" Enable transparent mode
let g:gruvbox_baby_transparent_mode = 1

" Load the colorscheme
colorscheme gruvbox-baby
```

If you want access to the palette you have to do this:

```lua
local colors = require("gruvbox-baby.colors").config()
vim.g.gruvbox_baby_highlights = {Normal = {fg = colors.orange}}
```

## πŸ”Œ Plugin support

- https://github.com/mhinz/vim-startify
- https://github.com/nvim-treesitter/nvim-treesitter
- https://github.com/kyazdani42/nvim-tree.lua
- https://github.com/phaazon/hop.nvim
- https://github.com/lukas-reineke/indent-blankline.nvim
- https://github.com/hrsh7th/nvim-cmp
- https://github.com/nvim-telescope/telescope.nvim
- https://github.com/nvim-lualine/lualine.nvim
- https://github.com/kkharji/lspsaga.nvim

#### enable Lualine

To enable `gruvbox-baby` theme for `Lualine`, simply specify it in your lualine settings:

```
require('lualine').setup {
options = {
-- ... your lualine config,
theme = "gruvbox-baby",
-- ... your lualine config,
}
}
```

## 🌈 Palette

![gruvbox-baby medium](extras/media/palettes/medium.svg)
![gruvbox-baby intensities](extras/media/palettes/shades.svg)

πŸ“‹ Colors

| **Color** | **Code** | **Name** |
| ----------------------------------------------------------------------- | -------- | ------------- |
| | #ebdbb2 | foreground |
| | #dedede | gray |
| | #504945 | medium_gray |
| | #665c54 | comment |
| | #e7d7ad | milk |
| | #cc241d | error_red |
| | #fb4934 | red |
| | #d65d0e | orange |
| | #fabd2f | bright_yellow |
| | #eebd35 | soft_yellow |
| | #d4879c | pink |
| | #b16286 | magenta |
| | #98971a | soft_green |
| | #689d6a | forest_green |
| | #8ec07c | clean_green |
| | #458588 | blue_gray |
| | #83a598 | dark_gray |
| | #7fa2ac | light_blue |

πŸ‘Ά Medium Intensity

![gruvbox-baby medium](extras/media/palettes/medium.svg)
|**Color**|**Code**|**Name**|
|---|---|---|
||#0d0e0f|dark0|
||#202020|dark|
||#242424|background_dark|
||#282828|background|
||#32302f|background_light|

🎱 Dark Intensity

![gruvbox-baby dark](extras/media/palettes/dark.svg)
|**Color**|**Code**|**Name**|
|---|---|---|
||#0d0e0f|dark0|
||#0d0e0f|dark|
||#171a1a|background_dark|
||#1d2021|background|
||#32302f|background_light|

🍦 Soft Intensity

![gruvbox-baby soft](extras/media/palettes/soft.svg)
|**Color**|**Code**|**Name**|
|---|---|---|
||#0d0e0f|dark0|
||#202020|dark|
||#282626|background_dark|
||#32302f|background|
||#3c3a39|background_light|

πŸ₯Ώ Soft Flat Intensity

![gruvbox-baby soft flat](extras/media/palettes/soft_flat.svg)
|**Color**|**Code**|**Name**|
|---|---|---|
||#0d0e0f|dark0|
||#202020|dark|
||#32302f|background_dark|
||#32302f|background|
||#3c3a39|background_light|

## πŸ‘½ Extras

- **iTerm2** color theme found on [extras](extras/iterm2)
- **tmux** color themes found on [extras](extras/tmux)
- **bash/zsh** color themes found on [extras](extras/bash)
- **Windows Terminal** color themes found on [extras](extras/windows_terminal)
- **fzf** color theme found on [extras](extras/fzf)
- **XCode Colorscheme** color theme found on [adityadaniel/gruvbox-baby-xcode](https://github.com/adityadaniel/gruvbox-baby-xcode)

#### add to Windows Terminal

To add the gruvbox-baby themes to Windows Terminal run,

```bash
extras/windows_terminal/add_themes_to_windows_terminal.py $PATH_TO_WINDOWS_TERMINAL_SETTINGS_JSON
# Windows Terminal settings.json can be found at
# %LOCALAPPDATA%/Packages/Microsoft.WindowsTerminal_8wekyb3d8bbwe/LocalState/settings.json
```

#### use with fzf
To use the fzf theme append the variable/string to your FZF_DEFAULT_OPTS variable

```bash
export FZF_DEFAULT_OPTS="${FZF_DEFAULT_OPTS} ${FZF_THEME}"
#To use the fzf theme the environment variables used have to be defined.
#You can use the tmux or bash file to export them to your environment
```

## πŸ‘† Acknowledgments

- Shutout to @ThePrimeagen for the inspiration for the plugin name, Gruvbox baby!
- I based my structure on https://github.com/folke/tokyonight.nvim (and also copied some of it)
- The all father πŸ‘΄ https://github.com/morhetz/gruvbox

## Other themes I've made

The Matrix - https://github.com/luisiacc/the-matrix.nvim