Skip to content

Lua port of the most famous vim colorscheme

License

Notifications You must be signed in to change notification settings

tmke8/gruvbox.nvim

 
 

Repository files navigation


gruvbox.nvim

Twitter Follow Made with Lua

A port of gruvbox community theme to lua with treesitter support!

Prerequisites

Neovim 0.8.0+

Installing

Using packer

use { "ellisonleao/gruvbox.nvim" }

Basic Usage

Inside init.vim

set background=dark " or light if you want light mode
colorscheme gruvbox

Inside init.lua

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

Configuration

Additional settings for gruvbox are:

-- setup must be called before loading the colorscheme
-- Default options:
require("gruvbox").setup({
  undercurl = true,
  underline = true,
  bold = true,
  italic = 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")

Overriding

Pallette

You can specify your own palette colors. For example:

require("gruvbox").setup({
    palette_overrides = {
        bright_green = "#990000",
    }
})
vim.cmd("colorscheme gruvbox")

More colors in the palette.lua file

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({
    overrides = {
        SignColumn = {bg = "#ff9900"}
    }
})
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 font

Other values can be seen in :h synIDattr

About

Lua port of the most famous vim colorscheme

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 99.3%
  • Other 0.7%