Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ellisonleao/gruvbox.nvim
Lua port of the most famous vim colorscheme
https://github.com/ellisonleao/gruvbox.nvim
colorscheme gruvbox lua neovim neovim-colorscheme neovim-plugin neovim-plugins
Last synced: about 2 months ago
JSON representation
Lua port of the most famous vim colorscheme
- Host: GitHub
- URL: https://github.com/ellisonleao/gruvbox.nvim
- Owner: ellisonleao
- License: mit
- Created: 2020-11-02T05:27:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-27T14:15:22.000Z (3 months ago)
- Last Synced: 2024-06-27T17:16:26.453Z (3 months ago)
- Topics: colorscheme, gruvbox, lua, neovim, neovim-colorscheme, neovim-plugin, neovim-plugins
- Language: Lua
- Homepage:
- Size: 350 KB
- Stars: 1,734
- Watchers: 9
- Forks: 183
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - ellisonleao/gruvbox.nvim - Gruvbox community colorscheme Lua port. (Colorscheme / Lua Colorscheme)
README
gruvbox.nvim
A port of [gruvbox community](https://github.com/gruvbox-community/gruvbox) theme to lua with [treesitter](https://github.com/nvim-treesitter/nvim-treesitter) and [semantic highlights](https://neovim.io/doc/user/lsp.html#lsp-semantic-highlight) support!
# Prerequisites
Neovim 0.8.0+
# Installing
## Using `packer`
```lua
use { "ellisonleao/gruvbox.nvim" }
```## Using `lazy.nvim`
```lua
{ "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...}
```## Using `vim-plug`
```vim
Plug 'ellisonleao/gruvbox.nvim'
```# Basic Usage
Inside `init.vim`
```vim
set background=dark " or light if you want light mode
colorscheme gruvbox
```Inside `init.lua`
```lua
vim.o.background = "dark" -- or "light" for light mode
vim.cmd([[colorscheme gruvbox]])
```# Configuration
Additional settings for gruvbox are:
```lua
-- Default options:
require("gruvbox").setup({
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
underline = true,
bold = true,
italic = {
strings = true,
emphasis = true,
comments = true,
operators = false,
folds = true,
},
strikethrough = true,
invert_selection = false,
invert_signs = false,
invert_tabline = false,
invert_intend_guides = false,
inverse = true, -- invert background for search, diffs, statuslines and errors
contrast = "", -- can be "hard", "soft" or empty string
palette_overrides = {},
overrides = {},
dim_inactive = false,
transparent_mode = false,
})
vim.cmd("colorscheme gruvbox")
```**VERY IMPORTANT**: Make sure to call setup() **BEFORE** calling the colorscheme command, to use your custom configs
## Overriding
### Palette
You can specify your own palette colors. For example:
```lua
require("gruvbox").setup({
palette_overrides = {
bright_green = "#990000",
}
})
vim.cmd("colorscheme gruvbox")
```### Highlight groups
If you don't enjoy the current color for a specific highlight group, now you can just override it in the setup. For
example:```lua
require("gruvbox").setup({
overrides = {
SignColumn = {bg = "#ff9900"}
}
})
vim.cmd("colorscheme gruvbox")
```It also works with treesitter groups and lsp semantic highlight tokens
```lua
require("gruvbox").setup({
overrides = {
["@lsp.type.method"] = { bg = "#ff9900" },
["@comment.lua"] = { bg = "#000000" },
}
})
vim.cmd("colorscheme gruvbox")
```Please note that the override values must follow the attributes from the highlight group map, such as:
- **fg** - foreground color
- **bg** - background color
- **bold** - true or false for bold font
- **italic** - true or false for italic fontOther values can be seen in [`synIDattr`]()