A light and dark color scheme for Neovim with minimal highlighting based on the Alabaster theme by Nikita Prokopov.
Most color schemes highlight everything they can, ending up looking like a fireworks show. Instead, Alabaster - and by extension Gypsum - uses minimal highlighting with just four main classes:
- Strings - Green
- Constants - Magenta/Purple (numbers, symbols, keywords, boolean values)
- Comments - Red/Yellow (with emphasis, not dimmed)
- Definitions - Blue (global definitions, functions)
Alabaster/Gypsum does not highlight standard language keywords (if, else, function, etc). They are usually the least important and most obvious part of any program.
While alabaster.nvim is an excellent port of the original Alabaster theme, it
lacks the mono and bg variants. I wrote Gypsum with the bg variant in mind and later extended it to include the
other variants as well. It also includes the dark-bg customization, which was not present in the original Alabaster
theme, and the ability to customize the palette.
- Single unified colorscheme with variants controlled through setup options
- Light/dark mode controlled by
vim.o.background - Monochrome variant (
monooption) - uses background colors for highlighting - Background-based variant (
bgoption) - uses colored backgrounds instead of colored text - Tree-sitter support
- Configurable italics for comments and strings
- Per-color customization
- Transparent background option
- Built-in Lualine theme
- Neovim. I'm using 0.11.4, but I think 0.9+ should work.
- Tree-sitter (for best results)
- LSP (for diagnostics and semantic highlighting)
Using lazy.nvim
{
"samflores/gypsum.nvim",
lazy = false,
priority = 1000,
config = function()
vim.o.background = "dark" -- or "light"
require("gypsum").setup({
mono = false,
bg = false,
})
vim.cmd([[colorscheme gypsum]])
end,
}vim.pack.add({
{ src = 'https://github.com/samflores/gypsum.nvim' }
})
vim.o.background = "dark" -- or "light"
require("gypsum").setup({
mono = false,
bg = false,
})
vim.cmd([[colorscheme gypsum]])On first startup, Neovim will automatically clone the repository. To update the plugin later, use:
vim.pack.update({ 'gypsum.nvim' })Clone the repository to any location and add it to your runtimepath:
# Clone the repository
git clone https://github.com/samflores/gypsum.nvim ~/path/to/gypsum.nvimThen in your init.lua:
-- Add to runtimepath
vim.opt.runtimepath:append("~/path/to/gypsum.nvim")
-- Configure and load
vim.o.background = "dark" -- or "light"
require("gypsum").setup({
mono = false,
bg = false,
})
vim.cmd([[colorscheme gypsum]])Default configuration:
require("gypsum").setup({
mono = false,
bg = false,
transparent = false,
italic_comments = true,
italic_strings = true,
colors = {},
})mono: Use monochrome variant with background colors for highlighting (trueorfalse)bg: Use background-based variant with colored backgrounds instead of colored text (trueorfalse)transparent: Remove background color (trueorfalse)italic_comments: Use italic font for comments (trueorfalse)italic_strings: Use italic font for strings (trueorfalse)colors: Table to override default colors (see Color Customization)
Note: Light/dark mode is controlled by vim.o.background setting, not by a configuration option.
The colorscheme automatically detects Neovim's background setting:
vim.o.background = "light" -- or "dark"
require("gypsum").setup()
vim.cmd([[colorscheme gypsum]])Configure the mono and bg options to use different variants:
-- Monochrome variant
vim.o.background = "dark"
require("gypsum").setup({ mono = true })
vim.cmd([[colorscheme gypsum]])
-- Background-based variant
vim.o.background = "light"
require("gypsum").setup({ bg = true })
vim.cmd([[colorscheme gypsum]])background=light, mono=false, bg=false→ Standard light themebackground=light, mono=true, bg=false→ Light monochrome themebackground=light, mono=false, bg=true→ Light background-based themebackground=dark, mono=false, bg=false→ Standard dark themebackground=dark, mono=true, bg=false→ Dark monochrome themebackground=dark, mono=false, bg=true→ Dark background-based theme
vim.keymap.set("n", "<leader>tl", function()
vim.o.background = "light"
vim.cmd([[colorscheme gypsum]])
end, { desc = "Gypsum Light" })
vim.keymap.set("n", "<leader>td", function()
vim.o.background = "dark"
vim.cmd([[colorscheme gypsum]])
end, { desc = "Gypsum Dark" })You can customize any color in the theme by passing a colors table to the setup function:
require("gypsum").setup({
colors = {
comment = "#FF0000",
string = "#00FF00",
bg = "#000000",
}
})All colors from the palette can be overridden:
bg,fg- Background and foregroundcomment,string,constant,definition,punctuation- Main syntax colorsselection,inactive_selection,line_highlight- UI colorsactive,orange,grey- Accent colorserror,warning,info,hint- Diagnostic colorsdiff_add,diff_delete,diff_change,diff_text- Git diff colors
{
"samflores/gypsum.nvim",
lazy = false,
priority = 1000,
config = function()
vim.o.background = "dark"
require("gypsum").setup({
colors = {
comment = "#DFDF8E",
string = "#95CB82",
}
})
vim.cmd([[colorscheme gypsum]])
end,
}- Background:
#F7F7F7 - Foreground:
#000000 - Comments:
#AA3731(red) - Strings:
#448C27(green) - Constants:
#7A3E9D(magenta) - Definitions:
#325CC0(blue) - Punctuation:
#777777(grey) - Selection:
#BFDBFE - Active/Cursor:
#007ACC
- Background:
#0E1415 - Foreground:
#CECECE - Comments:
#DFDF8E(yellow) - Strings:
#95CB82(green) - Constants:
#CC8BC9(purple) - Definitions:
#71ADE7(blue) - Punctuation:
#708B8D(grey-blue) - Selection:
#293334 - Active/Cursor:
#CD974B(orange)
Gypsum includes highlight groups for:
- Tree-sitter
- LSP
- Telescope
- nvim-tree
- GitSigns
- nvim-cmp
- Diagnostics
- Lualine (built-in themes)
Gypsum includes a built-in Lualine theme that automatically adapts to your colorscheme configuration:
require('lualine').setup {
options = {
theme = 'gypsum'
}
}The Lualine theme will match your vim.o.background, mono, and bg settings.
- Original Alabaster theme by Nikita Prokopov
- Original Neovim port by Chinmay Dalal
MIT License