• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tanvirtin/monokai.nvim: Monokai theme for Neovim written in Lua.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

tanvirtin/monokai.nvim

开源软件地址(OpenSource Url):

https://github.com/tanvirtin/monokai.nvim

开源编程语言(OpenSource Language):

Lua 98.4%

开源软件介绍(OpenSource 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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap