Neomodern.nvim
A collection of modern themes for Neovim
Install / Use
/learn @casedami/Neomodern.nvimREADME
<p align="center"> NEOMODERN.nvim </p>
<p align="center"> modern — simple — unintrusive </p> <p align="center"> <img src="https://img.shields.io/github/v/tag/cdmill/neomodern.nvim?style=flat&label=RELEASE&labelColor=%23212123&color=%238a88db" /> <img src="https://img.shields.io/badge/BUILT_WITH_LUA-blue?style=flat&color=%23629da3" /> <img src="https://img.shields.io/badge/NEOVIM-0.9-blue?style=flat&logo=Neovim&labelColor=%23212123&color=%238a88db" /> </p>Table of Contents
Gallery
🌚 MOON
A dark, spacy theme inspired by the colors of the moon
<details open> <summary>Dark Variant</summary>

❄️ ICECLIMBER
A theme with colors inspired from Nintendo's Ice Climbers characters
<details open> <summary>Dark Variant</summary>

🌱 GYOKURO
A fresh green tea inspired theme
<details open> <summary>Dark Variant</summary>

🍂 HOJICHA
A roasted green tea inspired theme
<details open> <summary>Dark Variant</summary>

🌷 ROSEPRIME
Inspired by ThePrimeagen's use of the Rosé-Pine theme
<details open> <summary>Dark Variant</summary>

Installation
Using vim.pack:
vim.pack.add({"https://github.com/casedami/neomodern.nvim"})
require("neomodern").setup({
-- optional configuration
})
require("neomodern").load()
Note, you only need to call setup if you are overriding any default opts. If you are only using it to set the theme, you could use the following instead:
vim.pack.add({"https://github.com/casedami/neomodern.nvim"})
require("neomodern").load("iceclimber")
Configuration
There are 5 themes included, each with a light and dark variant.
The light theme is used when vim.o.background = "light".
Default options are given below:
require("neomodern").setup({
-- 'default' default background
-- 'alt' darker background
-- 'transparent' background is not set
bg = "default",
theme = "moon", -- 'moon' | 'iceclimber' | 'gyokuro' | 'hojicha' | 'roseprime'
gutter = {
cursorline = false, -- highlight the cursorline in the gutter
dark = false, -- highlight gutter darker than the Normal bg
},
diagnostics = {
darker = true, -- use darker colors for diagnostics
undercurl = true, -- use undercurl for diagnostics
background = true, -- use a background color for diagnostics
},
-- override colors, see #Customization below
overrides = {
default = {},
hlgroups = {}
}
})
-- Call `load` after `setup`
require("neomodern").load()
Customization
Neomodern supports user-defined color overrides. The user can either override
the default colors or alter the highlights of a specific highlight group. When
overriding highlight groups, use neomodern's colors by prefixing the color name
with a dollar sign (e.g. $keyword). See :h highlight-args and :h neomodern-types for expected args, default color names, etc.
require("neomodern").setup {
overrides = {
default = {
keyword = '#817faf', -- redefine neomodern's `keyword` color
}
hlgroups = {
["@keyword.return"] = { gui = 'italic' },
["@keyword"] = { guifg = "$keyword", gui = 'bold' },
["@function"] = { guibg = "#ffffff" },
["String"] = { link = "Todo" },
}
},
}
Recipes
Prefer Treesitter Highlights
If you would prefer to bias the highlights towards treesitter (rather than lsp-semantic highlights), use this somewhere in your config:
vim.highlight.priorities.semantic_tokens = 95
Keymap to Swap Between Light/Dark variants
Neomodern uses vim.opt.background to decide which variant to load, so to
toggle between variants simply toggle vim.opt.background.
vim.keymap.set("n", "<leader>uc", function()
if vim.opt.background == "light" then
vim.opt.background = "dark"
else
vim.opt.background = "light"
end
end, { desc = "Toggle between light/dark mode" })
Contributing
If you are wanting support for a plugin or an extra please open an issue or submit a PR.
