sourse : https://gitlab.com/__tpb/monokai-pro.nvim
A Neovim theme written in Lua ported from the Visual Studio Code Monokai Pro theme.
- supports the latest Neovim 5.0 features like TreeSitter and LSP
- minimal inactive statusline
- vim terminal colors
- darker background for sidebar-like windows
- lualine theme
- TreeSitter
- LSP Diagnostics
- LSP Trouble
- LSP Saga
- Git Signs
- Git Gutter
- Telescope
- NvimTree
- WhichKey
- Indent Blankline
- Dashboard
- BufferLine
- Lualine
- Lightline
- Neogit
- vim-sneak
- navigator
- lsp_signature
- Neovim >= 0.5.0
Install the theme with your preferred package manager:
Plug 'https://gitlab.com/__tpb/monokai-pro.nvim'
use 'https://gitlab.com/__tpb/monokai-pro.nvim'
NOTE: Currently installing a plugin from Gitlab on Windows with Packer is broken ((#858)[wbthomason/packer.nvim#858])
UPDATE: Use alias as workaround for the Packer install issue
use {
'https://gitlab.com/__tpb/monokai-pro.nvim',
as = 'monokai-pro.nvim'
}
credit: wbthomason/packer.nvim#858 (comment)
Enable the colorscheme:
" Vim Script
colorscheme monokaipro
-- Lua
vim.cmd[[colorscheme monokaipro]]
To enable the monokaipro
theme for Lualine
, simply specify it in your lualine settings:
require('lualine').setup {
options = {
-- ... your lualine config
theme = 'monokaipro'
-- ... your lualine config
}
}
To enable the monokaipro
colorscheme for Lightline
:
" Vim Script
let g:lightline = {'colorscheme': 'monokaipro'}
❗️ configuration needs to be set BEFORE loading the color scheme with
colorscheme monokaipro
The theme comes with several filters:
default
the default Monokai Pro lookmachine
a variant with a bluish backgroundristretto
a variant with a red/brown backgroundoctogon
a variant with a purple/indigo backgroundspectrum
a variant with a flat gray backgroundclassic
a variant based on original Monokai colors
Option | Default | Description |
---|---|---|
monokaipro_filter | "default" |
The theme comes with six filters, default , machine , ristretto , octogon spectrum , and classic |
monokaipro_terminal_colors | true |
Configure the colors used when opening a :terminal in Neovim |
monokaipro_italic_comments | true |
Make comments italic |
monokaipro_italic_keywords | true |
Make keywords italic |
monokaipro_italic_functions | false |
Make functions italic |
monokaipro_italic_variables | false |
Make variables and identifiers italic |
monokaipro_transparent | false |
Enable this to disable setting the background color |
monokaipro_hide_inactive_statusline | false |
Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard StatusLine and LuaLine. |
monokaipro_sidebars | {} |
Set a darker background on sidebar-like windows. For example: ["vista_kind", "packer"] |
monokaipro_flat_sidebar | false |
When true sidebar like windows will use the normal background |
monokaipro_flat_float | false |
When true float and diagnostic like windows will use the normal background |
monokaipro_flat_term | false |
When true the integrated terminal will use the normal background |
monokaipro_colors | {} |
You can override specific color groups to use other groups or a hex color |
-- Example config in Lua
vim.g.monokaipro_filter = "machine"
vim.g.monokaipro_italic_functions = true
vim.g.monokaipro_sidebars = { "vista_kind", "packer" }
vim.g.monokaipro_flat_term = true
-- Change the "hint" color to the "orange" color, and make the "error" color bright red
vim.g.monokaipro_colors = { hint = "orange", error = "#ff0000" }
-- Load the colorscheme
vim.cmd[[colorscheme monokaipro]]
" Example config in VimScript
let g:monokaipro_filter = "machine"
let g:monokaipro_italic_functions = 1
vim.g.monokaipro_flat_term = 1
let g:monokaipro_sidebars = [ "vista_kind", "packer" ]
" Load the colorscheme
colorscheme monokaipro
- Toggle the style live without the need to exit NeoVim
Just call the function for style switching
"Vim-Script
:lua require('monokaipro.functions').toggle_style()
"This command toggles the style
The command can also be mapped to a key for fast style switching
"Vim-Script:
nnoremap <C-m> :lua require('monokaipro.functions').toggle_style()<CR>
--Lua:
vim.api.nvim_set_keymap('n', '<C-m>', [[<Cmd>lua require('monokaipro.functions').toggle_style()<CR>]], { noremap = true, silent = true })
- Change the style to a desired one using the function change_filter("desired style")
"Vim-Script:
:lua require('monokaipro.functions').change_filter("ristretto")
"This command changes the style to palenight
The command can also be mapped to a key for fast style switching
"Vim-Script:
nnoremap <C-9> :lua require('monokaipro.functions').change_filter('default')<CR>
nnoremap <C-0> :lua require('monokaipro.functions').change_filter('classic')<CR>
--Lua:
vim.api.nvim_set_keymap('n', '<C-9>', [[<Cmd>lua require('monokaipro.functions').change_filter('default')<CR>]], { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<C-0>', [[<Cmd>lua require('monokaipro.functions').change_filter('classic')<CR>]], { noremap = true, silent = true })
All pull requests are welcome.
Most of the credit for this theme should go to folke and marko-cerovac for the Tokyonight and material themes respectively. I did a lot of yanking and pasting! :)