Find out more here monokai.pro
- alpha-nvim
- bufferLine.nvim
- Cmp
- vim-illuminate
- indent-blankline
- neo-tree.nvim
- nvim-notify
- renamer.nvim
- lualine.nvim
- telescope.nvim
- toggleterm.nvim
- nvim-treesitter
- which-key.nvim
- breadcrumb.nvim
- nvim-navic
- wilder.nvim
- Lightline
- barbecue.nvim
- dashboard-nvim
- mason.nvim
- nvim-ts-rainbow2
- rainbow-delimeters.nvim
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
todimmed5
are muted shades for less prominent elements. - Background Colors:
dark
andblack
serve as your primary and secondary background colors.
Plug 'loctvl842/monokai-pro.nvim'
use {
"loctvl842/monokai-pro.nvim",
config = function()
require("monokai-pro").setup()
end
}
There are several themes included in this plugin.
- Pro β Monokai Pro (default)
- Octagon β Monokai Pro (Filter Octagon)
- Machine β Monokai Pro (Filter Machine)
- Ristretto β Monokai Pro (Filter Ristretto)
- Spectrum β Monokai Pro (Filter Spectrum)
- Classic β Monokai Classic
Example configuration:
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 to see my plugins setup for
border
if you want to setbackground_clear
For example:
float_win
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
})
Telescope
require("monokai-pro").setup({
-- ... your config
background_clear = {}
-- ... your config
})
require("telescope").setup({
-- ... your config
defaults = {
borderchars = { "β", " ", "β", "β", "β", " ", " ", "β" },
}
-- ... your config
})
- With the above config:
- Enable this colorscheme by using the following command after
setup
:
" Vim Script
colorscheme monokai-pro
require("monokai-pro").setup({
-- ... your config
})
-- lua
vim.cmd([[colorscheme monokai-pro]])
- To enable
monokai-pro
forLualine
:
require('lualine').setup {
options = {
-- ...
theme = 'monokai-pro'
-- ...
}
}
- To enable
monokai-pro
forbarbecue
:
require('barbecue').setup {
-- ...
theme = 'monokai-pro'
-- ...
}
- To enable
monokai-pro
forlightline
:
" Vim Script
let g:lightline = {'colorscheme': 'monokaipro'}
- Override function for customizing the final color scheme:
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:
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:
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
-- ...
})
- run command
MonokaiProSelect
to launch a menu to choose theme filter (required: nui.nvim) - or we can run command
MonokaiPro
with parameter to change theme filter: For example:MonokaiPro classic