Top Related Projects
Retro groove color scheme for Vim
Gruvbox with Material Palette
Lua port of the most famous vim colorscheme
🌲 Comfortable & Pleasant Color Scheme for Vim
Quick Overview
Gruvbox.nvim is a Lua port of the popular Gruvbox color scheme for Neovim. It provides a warm, retro-style theme with carefully chosen colors to reduce eye strain and improve readability. This project aims to offer a more performant and customizable version of the original Gruvbox theme for Neovim users.
Pros
- Written in Lua, providing better performance compared to VimScript alternatives
- Highly customizable with options to adjust contrast, palette, and individual highlight groups
- Supports both dark and light variants of the Gruvbox theme
- Integrates well with popular Neovim plugins and language servers
Cons
- Requires Neovim 0.8.0 or higher, which may not be available on all systems
- Some users may find the color palette too warm or saturated for their taste
- Limited documentation on advanced customization options
- May require manual configuration to achieve optimal appearance with certain plugins
Code Examples
- Basic setup in Lua:
require("gruvbox").setup({
contrast = "hard",
palette_overrides = {
bright_red = "#ff0000",
},
})
vim.cmd("colorscheme gruvbox")
This code sets up the Gruvbox theme with hard contrast and overrides the bright_red color.
- Customizing specific highlight groups:
require("gruvbox").setup({
overrides = {
Comment = { fg = "#928374", italic = true },
String = { fg = "#b8bb26", bold = true },
},
})
This example customizes the appearance of comments and strings in the editor.
- Using the transparent background option:
require("gruvbox").setup({
transparent_mode = true,
})
This code enables transparent background mode, allowing the terminal's background to show through.
Getting Started
To use gruvbox.nvim in your Neovim setup:
- Install the plugin using your preferred package manager (e.g., Packer, vim-plug)
- Add the following to your Neovim configuration file (init.lua):
require("gruvbox").setup({
-- Optional configuration options
})
vim.cmd("colorscheme gruvbox")
- Restart Neovim or source your configuration file
- Enjoy the Gruvbox color scheme!
Competitor Comparisons
Retro groove color scheme for Vim
Pros of gruvbox
- More established and widely adopted color scheme
- Supports a broader range of editors and applications beyond Neovim
- Extensive documentation and community support
Cons of gruvbox
- Less optimized for Neovim-specific features
- May require additional configuration for optimal Neovim integration
- Slower development cycle and updates
Code Comparison
gruvbox:
let g:gruvbox_contrast_dark = 'hard'
let g:gruvbox_italic = 1
colorscheme gruvbox
gruvbox.nvim:
require("gruvbox").setup({
contrast = "hard",
italic = true,
})
vim.cmd("colorscheme gruvbox")
The gruvbox.nvim repository is specifically designed for Neovim and uses Lua for configuration, making it more native to the Neovim ecosystem. It offers improved performance and better integration with Neovim's built-in LSP and Treesitter features. However, gruvbox has a longer history, wider adoption, and supports multiple editors beyond Neovim.
gruvbox.nvim provides a more streamlined setup process for Neovim users, with easier customization options through Lua. It also receives more frequent updates tailored to Neovim's development. On the other hand, gruvbox offers a more versatile solution for users who work across different editors or prefer traditional Vim script configuration.
Gruvbox with Material Palette
Pros of gruvbox-material
- More customization options, including palette variants and contrast levels
- Supports a wider range of plugins and file types out of the box
- Includes additional color schemes like "Mix" and "Original" for more variety
Cons of gruvbox-material
- May have a steeper learning curve due to more configuration options
- Potentially higher resource usage due to more extensive feature set
Code Comparison
gruvbox-material:
vim.g.gruvbox_material_background = 'medium'
vim.g.gruvbox_material_better_performance = 1
vim.cmd('colorscheme gruvbox-material')
gruvbox.nvim:
require("gruvbox").setup({
contrast = "medium",
palette_overrides = {},
})
vim.cmd("colorscheme gruvbox")
Both repositories offer Gruvbox-inspired color schemes for Neovim, but they differ in their approach and feature sets. gruvbox-material provides more customization options and out-of-the-box support for various plugins, while gruvbox.nvim offers a simpler, more streamlined experience. The choice between the two depends on the user's preference for customization versus simplicity.
Lua port of the most famous vim colorscheme
Pros of gruvbox.nvim
- Identical repositories, so no specific pros for one over the other
- Both offer the Gruvbox color scheme for Neovim
Cons of gruvbox.nvim
- No distinct disadvantages, as the repositories are the same
- Both have the same features and limitations
Code Comparison
The code in both repositories is identical. Here's a sample from the lua/gruvbox/palette.lua
file:
local colors = {
dark0_hard = "#1d2021",
dark0 = "#282828",
dark0_soft = "#32302f",
dark1 = "#3c3836",
dark2 = "#504945",
dark3 = "#665c54",
dark4 = "#7c6f64",
}
Summary
The comparison between ellisonleao/gruvbox.nvim and ellisonleao/gruvbox.nvim reveals that they are the same repository. Both offer the Gruvbox color scheme for Neovim, providing users with a warm and earthy color palette. The repositories share identical code, features, and functionality. Users can choose either one for implementing the Gruvbox theme in their Neovim setup, as there are no differences between them.
🌲 Comfortable & Pleasant Color Scheme for Vim
Pros of Everforest
- More color scheme variants (light and dark modes, plus soft, medium, and hard contrast options)
- Extensive support for various plugins and languages
- Includes additional themes for terminal emulators and other applications
Cons of Everforest
- Larger codebase, potentially more complex to customize
- May have a steeper learning curve for configuration
- Less focused on Neovim-specific features compared to Gruvbox.nvim
Code Comparison
Everforest:
vim.cmd('colorscheme everforest')
vim.g.everforest_background = 'hard'
vim.g.everforest_better_performance = 1
Gruvbox.nvim:
require("gruvbox").setup({
contrast = "hard",
palette_overrides = {
bright_green = "#b8bb26",
}
})
vim.cmd("colorscheme gruvbox")
Both color schemes offer easy setup, but Gruvbox.nvim provides a more Lua-centric configuration approach. Everforest relies more on global variables for customization, while Gruvbox.nvim uses a setup function with a table of options. Gruvbox.nvim's approach may be more intuitive for users familiar with modern Neovim plugin configurations.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
gruvbox.nvim
A port of gruvbox community theme to lua with treesitter and semantic highlights support!
Prerequisites
Neovim 0.8.0+
Installing
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,
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:
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
Top Related Projects
Retro groove color scheme for Vim
Gruvbox with Material Palette
Lua port of the most famous vim colorscheme
🌲 Comfortable & Pleasant Color Scheme for Vim
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot