Skip to content

Latest commit

 

History

History
239 lines (173 loc) · 7.54 KB

README.md

File metadata and controls

239 lines (173 loc) · 7.54 KB

🎨 Github Monochrome

A set of monochromatic light and dark color schemes for Neovim, inspired by huytd/vscode-github-light-monochrome and Nishantdd/github-monochrome-zed.

The following styles (themes) are available: light, dark, solarized, tokyonight, rosepine, and rosepine-dawn. Extra themes are included for Alacritty and Ghostty.

The project structure follows closely Tokyonight.nvim. Therefore, the theme configuration is very similar, and thanks to this, it allows for a high degree of customization (see bellow).

github-monochrome

Styles

The following styles are available:
light

github-monochrome-light

Activate with vim.cmd.colorscheme("github-monochrome-light").

dark

github-monochrome-dark

Activate with vim.cmd.colorscheme("github-monochrome-dark").

solarized

github-monochrome-solarized

Activate with vim.cmd.colorscheme("github-monochrome-solarized").

This style is based on edheltzel/vscode-better-solarized and maxmx03/solarized.nvim

rosepine

github-monochrome-rosepine

Activate with vim.cmd.colorscheme("github-monochrome-rosepine").

This style is based on rose-pine/neovim.

rosepine-dawn

github-monochrome-rosepine-dawn

Activate with vim.cmd.colorscheme("github-monochrome-rosepine-dawn").

This style is based on rose-pine/neovim.

tokyonight

github-monochrome-tokyonight

Activate with vim.cmd.colorscheme("github-monochrome-tokyonight")

This style is based on folke/tokyonight.nvim.

Requirements

  • Neovim >= 0.8.0

Installation and Usage

Install with your preferred package manager, or with lazy.nvim:

{
  "idr4n/github-monochrome.nvim",
  lazy = false,
  priority = 1000,
  opts = {},
}

To enable the theme with the default style (i.e., light) or with the style defined in your custom settings, use:

  • vim.cmd.colorscheme("github-monochrome")

To enable the theme with a specific style, use:

  • vim.cmd.colorscheme("github-monochrome-light")
  • vim.cmd.colorscheme("github-monochrome-dark")
  • vim.cmd.colorscheme("github-monochrome-solarized")
  • vim.cmd.colorscheme("github-monochrome-tokyonight")
  • vim.cmd.colorscheme("github-monochrome-rosepine")
  • vim.cmd.colorscheme("github-monochrome-rosepine-dawn")

Configuration

The configuration is very similar to that of tokyonight.nivm, with a few less options available, and few more to control styling.

Default Options
{
  style = "light", -- "light", "dark", "solarized", "tokyonight", "rosepine", "rosepine-dawn"
  transparent = false,
  terminal_colors = true, -- Configure the colors used when opening a `:terminal`
  lualine_bold = { a = true, b = false, c = false }, -- make lualine sections a, b, or c bold

  styles = {
    comments = { italic = true },
    keywords = { bold = true },
    functions = { bold = true },
    statements = { bold = true }, -- e.g., try/except statements, but also if, for, etc.
    conditionals = { bold = true }, -- e.g., if statements
    loops = { bold = true }, -- e.g., for, while statements
    variables = {},
    floats = "normal", -- "dark", "transparent" or "normal"
    sidebars = "normal", -- "dark", "transparent" or "normal"
  },

  --- You can override specific color groups to use other groups or a hex color
  ---@param colors ColorScheme
  --- @param style? "light"|"dark"|"solarized"|"tokyonight"|"rosepine"|"rosepine-dawn"
  on_colors = function(colors, style) end,

  --- You can override specific highlights to use other groups or a hex color
  ---@param highlights gm.Highlights
  ---@param colors ColorScheme
  --- @param style? "light"|"dark"|"solarized"|"tokyonight"|"rosepine"|"rosepine-dawn"
  on_highlights = function(highlights, colors, style) end,

  ---@type table<string, boolean|{enabled:boolean}>
  plugins = {
    -- set to false to manually enable plugins
    -- or set to true and then manually disable plugins
    all = true,
    -- add any plugins that you want to enable/disable from those supported
    -- telescope = false,
    -- ["indent-blankline"] = false
  },
}

Modifying colors and highlight groups

Example:

{
  styles = {
    comments = { italic = false },
    conditionals = { bold = true },
    loops = { bold = true },
    variables = {},
    floats = "dark",
    sidebars = "dark",
  },
  on_colors = function(c, s)
    -- applies to all styles
    -- c.bg = vim.o.background == "light" and c.bg or "#000000"
    c.number = c.purple

    -- applies to 'light' style only
    if s == "light" then
      c.bg = "#F4F4F4"
    end
  end,
  on_highlights = function(hl, c, s)
    -- applies to all styles
    hl.IblScope = { fg = "#634E89" }
    hl.FloatBorder = { fg = c.magenta }
    hl.TreesitterContext = { bg = c.none }
    hl.TreesitterContextBottom = { underline = true, sp = c.magenta }

    -- applies to 'light' style only
    if s == "light" then
      hl.FloatBorder = { fg = c.red }
    end
    -- applies to 'solarized' style only
    if s == "solarized" then
      hl.IblScope = { fg = "#62868C" }
    end
  end,
}

Supported Plugins

Currently, the following plugins are supported (more will be added as needed):

(use the name in parenthesis to enable/disable in config)

  • blink.cmp (blink)
  • gitsigns.nvim (gitsigns)
  • glance.nvim (glance)
  • indent-blankline.nvim (indent-blankline)
  • mini.pick (mini_pick)
  • mini.tabline (mini_tabline)
  • neo-tree.nvim (neo-tree)
  • noice.nvim (noice)
  • nvim-cmp (cmp)
  • nvim-notify (notify)
  • nvim-tree.lua (nvim-tree)
  • nvim-treesitter-context (treesitter-context)
  • render-markdown.nvim (render-markdown)
  • telescope.nvim (telescope)
  • snacks indent (snacks_indent)
  • snacks picker (snacks_picker)
  • vim-illuminate (illuminate)
  • which-key.nvim (which-key)

Acknowledgements