tanvirtin/monokai.nvim

github github
treesitter-colorschemes plugin
star 68
stars
alert-circle 0
open issues
users 1
subscribers
git-branch 17
forks
CREATED

2021-03-08

UPDATED

18 days ago

packer

require('packer').startup(function()
  use 'tanvirtin/monokai.nvim'
end)

paq

require "paq" { 
  'tanvirtin/monokai.nvim'
}

Neovim Monokai

Monokai Theme for Neovim with tree-sitter support

Supported Monokai Flavours

  • Monokai (monokai)
  • Monokai Pro (monokai_pro)
  • Monokai Soda (monokai_soda)

Prerequisites

Neovim >= 0.5.

Installation

Plugin Manager Command
Packer use 'tanvirtin/monokai.nvim'
Vim-plug Plug 'tanvirtin/monokai.nvim'
NeoBundle NeoBundle 'tanvirtin/monokai.nvim'
Vundle Bundle 'tanvirtin/monokai.nvim'
Pathogen git clone https://github.com/tanvirtin/monokai.nvim.git ~/.vim/bundle/monokai.nvim
Dein call dein#add('tanvirtin/monokai.nvim')

Usage

In VimL:

syntax on
colorscheme monokai
colorscheme monokai_pro
colorscheme monokai_soda

In Lua:

require('monokai').setup {}
require('monokai').setup { palette = require('monokai').pro }
require('monokai').setup { palette = require('monokai').soda }

Customization

It is possible to customize Monokai theme with setup function (only in Lua). Passed argument will override default configuration values witch are:

{
    palette = {
        name = 'monokai',
        base1 = '#272a30',
        base2 = '#26292C',
        base3 = '#2E323C',
        base4 = '#333842',
        base5 = '#4d5154',
        base6 = '#9ca0a4',
        base7 = '#b1b1b1',
        border = '#a1b5b1',
        brown = '#504945',
        white = '#f8f8f0',
        grey = '#8F908A',
        black = '#000000',
        pink = '#f92672',
        green = '#a6e22e',
        aqua = '#66d9ef',
        yellow = '#e6db74',
        orange = '#fd971f',
        purple = '#ae81ff',
        red = '#e95678',
        diff_add = '#3d5213',
        diff_remove = '#4a0f23',
        diff_change = '#27406b',
        diff_text = '#23324d',
    },
    custom_hlgroups = {},
}

An example of this would be as follows:

local monokai = require('monokai')
local palette = monokai.classic
monokai.setup {
    palette = {
        diff_text = '#133337',
    },
    custom_hlgroups = {
        TSInclude = {
            fg = palette.aqua,
        },
        GitSignsAdd = {
            fg = palette.green,
            bg = palette.base2
        },
        GitSignsDelete = {
            fg = palette.pink,
            bg = palette.base2
        },
        GitSignsChange = {
            fg = palette.orange,
            bg = palette.base2
        },
    }
}

Extras

Extra color configs for Kitty, Alacritty, Windows Terminal, can be found in extras. To use them, refer to their respective documentation.