Voltar ao ranking

ellisonleao/gruvbox.nvim

Lua

Lua port of the most famous vim colorscheme

neovimcolorschemeluagruvboxneovim-pluginneovim-pluginsneovim-colorscheme
Crescimento de estrelas
Estrelas
2.6k
Forks
242
Crescimento semanal
Issues
24
1k2k
nov. de 2020set. de 2022ago. de 2024jul. de 2026
README


gruvbox.nvim

Twitter Follow Made with Lua

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

Prerequisites

Neovim 0.8.0+

Installing

Using vim.pack (Neovim 0.12+)

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

require("gruvbox").setup()
vim.cmd.colorscheme("gruvbox")

Using packer

use { "ellisonleao/gruvbox.nvim" }

Using lazy.nvim

{ "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...}

Using vim-plug

Plug '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:

-- 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,
  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:

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:

require("gruvbox").setup({
    overrides = {
        SignColumn = {bg = "#ff9900"}
    }
})
vim.cmd("colorscheme gruvbox")

It also works with treesitter groups and lsp semantic highlight tokens

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 font

Other values can be seen in synIDattr

Repositórios relacionados
neovim/neovim

Vim-fork focused on extensibility and usability

Vim ScriptOtherneovimc
neovim.io
101.3k7k
junegunn/fzf

:cherry_blossom: A command-line fuzzy finder

GoGo ModulesMIT Licensefzfgo
junegunn.github.io/fzf/
81.9k2.8k
sxyazi/yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.

Rustcrates.ioMIT Licenseasyncioconcurrency
yazi-rs.github.io
40.6k945
NvChad/NvChad

Blazing fast Neovim framework providing solid defaults and a beautiful UI, enhancing your neovim experience.

LuaGNU General Public License v3.0nvimneovim
nvchad.com
28.4k2.2k
LazyVim/LazyVim

Neovim config for the lazy

LuaApache License 2.0neovimneovim-conf
lazyvim.github.io
27k1.8k
folke/lazy.nvim

💤 A modern plugin manager for Neovim

LuaApache License 2.0neovimneovim-plugin
lazy.folke.io
21.3k585
rockerBOO/awesome-neovim

Collections of awesome neovim plugins.

ShellCreative Commons Zero v1.0 Universalnvim-luaneovim
21.2k1k
SpaceVim/SpaceVim

A modular configuration of Vim and Neovim

Vim Scriptneovimspacevim
spacevim.org
20.4k1.4k
wsdjeg/SpaceVim

A modular configuration of Vim and Neovim

Vim ScriptGNU General Public License v3.0neovimspacevim
spacevim.org
20.2k1.4k
nvim-telescope/telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.

LuaMIT Licenseneovimlua
19.6k956
LunarVim/LunarVim

🌙 LunarVim is an IDE layer for Neovim. Completely free and community driven.

LuaGNU General Public License v3.0neovimvim
lunarvim.org
19.3k1.5k
mhinz/vim-galore

:mortar_board: All things Vim!

Vim ScriptCreative Commons Attribution Share Alike 4.0 Internationalvimguide
17.9k631