Skip to content

A complete overhaul of the gruvbox theme, based on both ellisonleao's gruvbox.nvim and folke's tokyonight.nvim themes.

Notifications You must be signed in to change notification settings

pedrog14/gruvbox.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gruvbox.nvim

A complete overhaul of the gruvbox original theme, based on both ellisonleao's gruvbox.nvim and folke's tokyonight.nvim themes.

Dark
Hard Medium Soft
Light
Hard Medium Soft

Prerequisites

Neovim 0.9.0+

Installing

Using lazy.nvim

{ "pedrog14/gruvbox.nvim", lazy = false, priority = 1000, opts = {...} }

Using vim-plug

Plug 'pedrog14/gruvbox.nvim'

Using packer

use { "pedrog14/gruvbox.nvim" }

Basic Usage

Inside your lua config:

vim.opt.background = "dark" -- or "light" for light mode
vim.cmd.colorscheme("gruvbox")

Inside init.vim:

set background=dark " or "light" for light mode
colorscheme gruvbox

Configuration

The default settings for gruvbox are:

{
    cache = true,
    contrast = nil, --[[@type GruvboxContrast]]
    dim_inactive = false,
    terminal_colors = true,
    transparent_mode = false,
    color_override = {}, --[[@type GruvboxColors]]
    group_override = {}, --[[@type table<string, vim.api.keyset.highlight>]]
    plugins = {
        all = package.loaded.lazy == nil,
        auto = true,
    },
    -- stylua: ignore
    style = {
        bold          = true,
        italic        = true,
        reverse       = true,
        strikethrough = true,
        undercurl     = true,
        underline     = true,

        comments      = {}, --[[@type vim.api.keyset.highlight]]
        indent        = {}, --[[@type vim.api.keyset.highlight]]
        operators     = {}, --[[@type vim.api.keyset.highlight]]
        selection     = {}, --[[@type vim.api.keyset.highlight]]
        signs         = {}, --[[@type vim.api.keyset.highlight]]
        strings       = {}, --[[@type vim.api.keyset.highlight]]
        tabline       = {}, --[[@type vim.api.keyset.highlight]]
    },
}

VERY IMPORTANT: Make sure to call setup() BEFORE calling the colorscheme command, to use your custom configs!

Overriding

Palette

You can specify your own colors. For example:

require("gruvbox").setup({
    color_override = {
        bg0 = "#000000"
    }
})

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:

require("gruvbox").setup({
    group_override = {
        SignColumn = { bg = "#ff9900" }
    }
})

It also works with treesitter groups and lsp semantic highlight tokens:

require("gruvbox").setup({
    group_override = {
        ["@lsp.type.method"] = { bg = "#ff9900" },
        ["@comment.lua"] = { bg = "#000000" },
    }
})

Please notice that the values on the overrides must follow the pattern that can be seen on synIDattr.

About

A complete overhaul of the gruvbox theme, based on both ellisonleao's gruvbox.nvim and folke's tokyonight.nvim themes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages