A VSCode One Monokai-inspired colorscheme, rewritten in Lua for seamless Neovim integration.
Normal background
Transparent background
{
"cpea2506/one_monokai.nvim",
}
- Neovim >= 0.9.1
- nvim-treesitter for enhanced syntax highlighting (optional) 😇
vim.cmd.colorscheme "one_monokai"
Or use the following approach if you wish to customize options:
require("one_monokai").setup({
-- your custom options here
})
Option | Description | Type | Note |
---|---|---|---|
transparent |
Enables a transparent background | boolean |
N/A |
colors |
Custom color definitions | table<string, string> |
N/A |
highlights |
Custom highlight groups | function(colors): table |
:h nvim_set_hl |
italics |
Enables italic | boolean |
N/A |
require("one_monokai").setup({
transparent = false,
colors = {},
highlights = function(colors)
return {}
end,
italics = true,
})
The color module provides two methods, darken
and lighten
, to blend colors based on an alpha value (between 0 and 1). You can use them as follows:
colors["<color-name>"]:darken(alpha)
colors["<color-name>"]:lighten(alpha)
require("one_monokai").setup({
transparent = true, -- Enable transparent background
colors = {
lmao = "#ffffff", -- Define a new color
pink = "#ec6075", -- Override a default color
},
highlights = function(colors)
-- Customize highlight groups
-- The key-value pairs are passed to "nvim_set_hl"
return {
Normal = { bg = colors.lmao },
DiffChange = { fg = colors.white:darken(0.3) },
ErrorMsg = { fg = colors.pink, standout = true },
["@lsp.type.keyword"] = { link = "@keyword" }
}
end,
italics = false, -- Disable italic
})
Tip
To find the highlight group for an item, place the cursor inside it and run :Inspect
. Refer to :h :Inspect
for more information.
require("lualine").setup {
options = {
-- ...other options
theme = "one_monokai"
}
}
This is, in my opinion, the best theme I’ve ever used. After using it in Vim for a long time, I rewrote it in Lua to ensure better compatibility with Neovim and to allow for easier customization.
A huge thanks to these talented and inspiring creators:
For detailed instructions on how to contribute to this colorscheme, please see the contributing guidelines.