Skip to content

pedrog14/gruvbox.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gruvbox.nvim

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

Dark
Hard Medium Soft
dark-hard dark-medium dark-soft
Light
Hard Medium Soft
light-hard light-medium light-soft

Requirements

  • Neovim >= 0.9.0
  • Git (Any recent version may work)

Installation

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

Built-in plugin manager (vim.pack):

vim.pack.add({ { src = "https://github.com/pedrog14/gruvbox.nvim" } })

Basic Usage

Inside your lua config:

vim.o.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,
  dim_inactive = false,
  terminal_colors = true,
  transparent = false,

  ---@type table<string, boolean>?
  plugins = {
    all = package.loaded.lazy == nil,
    auto = true,
  },

  ---@type table<Style, vim.api.keyset.highlight>?
  style = {
    comment = { italic = true },
    operator = {},
    selection = {},
    sign = {},
    string = {},
  },

  ---@type Contrast?
  contrast = "medium",

  ---@type fun(colors: GruvboxColors)?
  color_override = nil,

  ---@type fun(hl: table<string, vim.api.keyset.highlight>, colors: GruvboxColors)?
  group_override = nil,
}

You can modify your settings by calling the require("gruvbox").setup lua function before setting your colorscheme to gruvbox, with the proper argument table as presented above.

Overriding

Colors

You can modify and specify your own colors. For example:

require("gruvbox").setup({
  color_override = function(colors)
    colors.bg0 = colors.gray
    colors.fg1 = "#ffffff"
  end
})

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 = function(hl, colors)
    hl.Normal = { bg = "#000000" }
    hl.SignColumn = { fg = colors.orange }
  end
})

Please notice that the highlight table must be defined as seen on :h nvim_set_hl(), in the {val} parameter section.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages