cpea2506/one_monokai.nvim

github github
colorschemetreesitter-colorschemes
stars 152
issues 2
subscribers 1
forks 9
CREATED

2021-10-29

UPDATED

last month


VSCode One Monokai colorscheme written in Lua for Neovim.

demo

transparent demo

:rocket: Installation

{
  "cpea2506/one_monokai.nvim",
}

Requirement

  • Neovim >= 0.9.1
  • nvim-treesitter for better syntax highlighting (optional) 😇

:gear: Setup

vim.cmd.colorscheme "one_monokai"

Or prefer below if you want to customize some options

require("one_monokai").setup({
    -- your options
})

Options

Option Description Type Note
transparent enable transparent background boolean N/A
colors custom colors table<string, string> N/A
themes custom highlight groups function(colors): tables :h nvim_set_hl
italics enable italics boolean N/A

Default

require("one_monokai").setup({
    transparent = false,
    colors = {},
    themes = function(colors)
        return {}
    end,
    italics = true,
})

Customization example

Available colors and themes

  1. colors
  2. themes

Color provides two method, darken and lighten to blend color based on provided alpha value. You can access them via:

colors["<color-name>"]:darken(alpha)
colors["<color-name>"]:lighten(alpha)

Example

require("one_monokai").setup({
    transparent = true,  -- enable transparent window
    colors = {
        lmao = "#ffffff", -- add new color
        pink = "#ec6075", -- replace default color
    },
    themes = function(colors)
        -- change highlight of some groups,
        -- the key and value will be passed respectively to "nvim_set_hl"
        return {
            Normal = { bg = colors.lmao },
            DiffChange = { fg = colors.white:darken(0.3) },
            ErrorMsg = { fg = colors.pink, standout = true },
            ["@lsp.type.keyword"] = { link = "@keyword" }
        }
    end,
    italics = false, -- disable italics
})

:champagne: Plugins support

lualine demo

require("lualine").setup {
  options = {
      -- ...other options
      theme = "one_monokai"
  }
}

:eyes: Inspiration

This is the best theme I’ve ever seen in my eyes. I’ve tried it written in Vim for a long time and decided to write it in Lua for compatibility with Neovim, and make it easy to do some custom changes.

Thanks for these talented and amazing people:

:scroll: Contribution

Please see the contributing guidelines for detailed instructions on how to contribute to this colorscheme.