Coder Social home page Coder Social logo

monokai.nvim's Introduction

Neovim Monokai

Monokai Theme for Neovim with tree-sitter support

monokai nvim

Supported Monokai Flavours

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

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
colorscheme monokai_ristretto

In Lua:

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

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
        },
    }
}

With italics option (true by default), you can disable italic used by default in style for some groups (Function, Keyword, Comment...).

require('monokai').setup { italics = false }

Extras

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

monokai.nvim's People

Contributors

danngreen avatar eed3si9n avatar gtklocker avatar jpe90 avatar kmaasrud avatar lcheylus avatar rahix avatar tanvirtin avatar wertasy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.