https://github.com/loctvl842/monokai-pro.nvim
Monokai Pro theme for Neovim written in Lua, with multiple filters: Pro, Classic, Machine, Octagon, Ristretto, Spectrum
https://github.com/loctvl842/monokai-pro.nvim
colorscheme lua monokai-color-scheme monokai-pro monokai-theme neovim theme
Last synced: 3 months ago
JSON representation
Monokai Pro theme for Neovim written in Lua, with multiple filters: Pro, Classic, Machine, Octagon, Ristretto, Spectrum
- Host: GitHub
- URL: https://github.com/loctvl842/monokai-pro.nvim
- Owner: loctvl842
- License: mit
- Created: 2022-11-20T15:47:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-24T11:28:33.000Z (4 months ago)
- Last Synced: 2025-02-24T12:22:56.271Z (4 months ago)
- Topics: colorscheme, lua, monokai-color-scheme, monokai-pro, monokai-theme, neovim, theme
- Language: Lua
- Homepage:
- Size: 2.41 MB
- Stars: 523
- Watchers: 7
- Forks: 53
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Find out more here [monokai.pro](https://monokai.pro/)

## ⭐ Pro

## 🛑 Octagon

## 🤖 Machine

## ☕ Ristretto

## 🌈 Spectrum

## 👴 Classic

### 🔌 Plugin support
- [alpha-nvim](https://github.com/goolord/alpha-nvim)
- [bufferLine.nvim](https://github.com/akinsho/bufferline.nvim)
- [Cmp](https://github.com/hrsh7th/nvim-cmp)
- [vim-illuminate](https://github.com/RRethy/vim-illuminate)
- [indent-blankline](https://github.com/lukas-reineke/indent-blankline.nvim)
- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim)
- [nvim-notify](https://github.com/rcarriga/nvim-notify)
- [renamer.nvim](https://github.com/filipdutescu/renamer.nvim)
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
- [toggleterm.nvim](https://github.com/akinsho/toggleterm.nvim)
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
- [which-key.nvim](https://github.com/folke/which-key.nvim)
- [breadcrumb.nvim](https://github.com/loctvl842/breadcrumb.nvim)
- [nvim-navic](https://github.com/SmiteshP/nvim-navic)
- [wilder.nvim](https://github.com/gelguy/wilder.nvim)
- [Lightline](https://github.com/itchyny/lightline.vim)
- [barbecue.nvim](https://github.com/utilyre/barbecue.nvim)
- [dashboard-nvim](https://github.com/glepnir/dashboard-nvim)
- [mason.nvim](https://github.com/williamboman/mason.nvim)
- [nvim-ts-rainbow2](https://github.com/HiPhish/nvim-ts-rainbow2)
- [rainbow-delimeters.nvim](https://gitlab.com/HiPhish/rainbow-delimiters.nvim)## Palette
```lua
cs.base = {
dark = p.dark2, -- "#19181a"
black = p.dark1, -- "#221f22"
red = p.accent1, -- "#ff6188"
green = p.accent4, -- "#a9dc76"
yellow = p.accent3, -- "#ffd866"
blue = p.accent2, -- "#fc9867"
magenta = p.accent6, -- "#ab9df2"
cyan = p.accent5, -- "#78dce8"
white = p.text, -- "#fcfcfa"
dimmed1 = p.dimmed1, -- "#c1c0c0"
dimmed2 = p.dimmed2, -- "#939293"
dimmed3 = p.dimmed3, -- "#727072"
dimmed4 = p.dimmed4, -- "#5b595c"
dimmed5 = p.dimmed5, -- "#403e41"
}
```- **Primary Colors:** `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white` are your vibrant accent colors.
- **Dimmed Colors:** `dimmed1` to `dimmed5` are muted shades for less prominent elements.
- **Background Colors:** `dark` and `black` serve as your primary and secondary background colors.## 📦 Installation
[vim-plug](https://github.com/junegunn/vim-plug)
```vim
Plug 'loctvl842/monokai-pro.nvim'
```[packer](https://github.com/wbthomason/packer.nvim)
```lua
use {
"loctvl842/monokai-pro.nvim",
config = function()
require("monokai-pro").setup()
end
}
```## 🔨 Configuration
There are several themes included in this plugin.
- [Pro](#-pro) – Monokai Pro _(default)_
- [Octagon](#-octagon) – Monokai Pro (Filter Octagon)
- [Machine](#-machine) – Monokai Pro (Filter Machine)
- [Ristretto](#-ristretto) – Monokai Pro (Filter Ristretto)
- [Spectrum](#-spectrum) – Monokai Pro (Filter Spectrum)
- [Classic](#-classic) – Monokai ClassicExample configuration:
```lua
require("monokai-pro").setup({
transparent_background = false,
terminal_colors = true,
devicons = true, -- highlight the icons of `nvim-web-devicons`
styles = {
comment = { italic = true },
keyword = { italic = true }, -- any other keyword
type = { italic = true }, -- (preferred) int, long, char, etc
storageclass = { italic = true }, -- static, register, volatile, etc
structure = { italic = true }, -- struct, union, enum, etc
parameter = { italic = true }, -- parameter pass in function
annotation = { italic = true },
tag_attribute = { italic = true }, -- attribute of tag in reactjs
},
filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
-- Enable this will disable filter option
day_night = {
enable = false, -- turn off by default
day_filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
night_filter = "spectrum", -- classic | octagon | pro | machine | ristretto | spectrum
},
inc_search = "background", -- underline | background
background_clear = {
-- "float_win",
"toggleterm",
"telescope",
-- "which-key",
"renamer",
"notify",
-- "nvim-tree",
-- "neo-tree",
-- "bufferline", -- better used if background of `neo-tree` or `nvim-tree` is cleared
},-- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline"
plugins = {
bufferline = {
underline_selected = false,
underline_visible = false,
},
indent_blankline = {
context_highlight = "default", -- default | pro
context_start_underline = false,
},
},
---@param c Colorscheme
override = function(c) end,
---@param cs Colorscheme
---@param p ColorschemeOptions
---@param Config MonokaiProOptions
---@param hp Helper
override = function(cs: Colorscheme, p: ColorschemeOptions, Config: MonokaiProOptions, hp: Helper) end,
})
```- Check my [nvim](https://github.com/loctvl842/nvim) to see my plugins setup for `border` if you want to set `background_clear`
For example:
float_win
```lua
require("monokai-pro").setup({
-- ... your config
background_clear = { "float_win" }
-- ... your config
})require("cmp").setup({
-- ... your config
window = {
border = "rounded",
}
completion = {
border = "rounded",
}
-- ... your config
})
```- With the above config:
- With the default config:
Telescope
```lua
require("monokai-pro").setup({
-- ... your config
background_clear = {}
-- ... your config
})require("telescope").setup({
-- ... your config
defaults = {
borderchars = { "█", " ", "▀", "█", "█", " ", " ", "▀" },
}
-- ... your config
})
```- With the above config:

- With the default config:
## 📚 Usage
- Enable this colorscheme by using the following command after `setup`:
```vim
" Vim Script
colorscheme monokai-pro
``````lua
require("monokai-pro").setup({
-- ... your config
})
-- lua
vim.cmd([[colorscheme monokai-pro]])
```- To enable `monokai-pro` for `Lualine`:
```lua
require('lualine').setup {
options = {
-- ...
theme = 'monokai-pro'
-- ...
}
}
```- To enable `monokai-pro` for `barbecue`:
```lua
require('barbecue').setup {
-- ...
theme = 'monokai-pro'
-- ...
}```
- To enable `monokai-pro` for `lightline`:
```vim
" Vim Script
let g:lightline = {'colorscheme': 'monokaipro'}
```- Override function for customizing the final color scheme:
```lua
require("monokai-pro").setup({
-- ...
override = function()
return {
Normal = { bg = "#000000" }
}
end
-- ...
})
```- Customize your own palette:
This is a sample config to use `Tokyonight` as the palette:
```lua
require("monokai-pro").setup({
-- ...
--- @param filter "classic" | "machine" | "octagon" | "pro" | "ristretto" | "spectrum"
override = function(c)
return {
IndentBlanklineChar = { fg = c.base.dimmed4 },
}
end,
overridePalette = function(filter)
return {
dark2 = "#101014",
dark1 = "#16161E",
background = "#1A1B26",
text = "#C0CAF5",
accent1 = "#f7768e",
accent2 = "#7aa2f7",
accent3 = "#e0af68",
accent4 = "#9ece6a",
accent5 = "#0DB9D7",
accent6 = "#9d7cd8",
dimmed1 = "#737aa2",
dimmed2 = "#787c99",
dimmed3 = "#363b54",
dimmed4 = "#363b54",
dimmed5 = "#16161e",
}
end
-- ...
})
```- Customize the scheme:
This is a sample config to use a darker background for almost all supported plugins:
```lua
require("monokai-pro").setup({
-- ...
overrideScheme = function(cs, p, config, hp)
local cs_override = {}
local calc_bg = hp.blend(p.background, 0.75, '#000000')cs_override.editor = {
background = calc_bg,
}
return cs_override
end
-- ...
})
```## 🔧 Command
- run command `MonokaiProSelect` to launch a menu to choose theme filter (required: [nui.nvim](https://github.com/MunifTanjim/nui.nvim))
- or we can run command `MonokaiPro` with parameter to change theme filter: For example:
> `MonokaiPro classic`