Skip to content

cpea2506/one_monokai.nvim

Repository files navigation

logo
One Monokai Nvim

VSCode One Monokai colorscheme written in Lua for Neovim.

demo

Normal background


transparent demo

Transparent background

🚀 Installation

{
  "cpea2506/one_monokai.nvim",
}

Requirement

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

⚙️ 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
})

🍾 Plugins support

lualine demo

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

👀 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:

📜 Contribution

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