Skip to content

A minmal Neovim colorscheme using only two colors for a plain text editor experience.

License

Notifications You must be signed in to change notification settings

jackplus-xyz/binary.nvim

Repository files navigation

binary.nvim

A over-minimal Neovim color scheme using only two colors for a plain text editor experience.

binary

Check here for inspirations!

Warning

This is an extreme color scheme that:

  • Eliminates ALL colors
  • Removes ALL font styles

Tip

If you are not sure if you have the strength, consider:

Features

  • Uses only foreground and background colors
    • No syntax highlighting
    • No special highlighting for diagnostics, search results, or UI elements

Installation

Using lazy.nvim:

{
    "jackplus-xyz/binary.nvim",
    opts = {
        -- Add your configuration here
    }
}

Configuration

binary.nvim comes with the following default configuration:

{
  style = "system", -- Theme style: "system" | "light" | "dark"
  colors = {        -- Colors used for the "light" theme; reversed automatically for "dark"
    fg = "#000000", -- Foreground color
    bg = "#ffffff", -- Background color
  },
  reversed_group = {}, -- Highlight groups with reversed `fg` and `bg` (e.g., `CursorLine`, `Visual`)
}

The default reversed_group includes commonly used highlight groups, with fg and bg reversed for better visibility:

-- default reversed_group
{
  -- Editor UI
  Cursor = true,
  CursorLine = true,
  IncSearch = true,
  MatchParen = true,
  PmenuSel = true,
  QuickFixLine = true,
  Search = true,
  Substitute = true,
  TabLineSel = true,
  TermCursor = true,
  TermCursorNC = true,
  Visual = true,
  VisualNOS = true,
  WildMenu = true,

  -- LSP
  LspReferenceText = true,
  LspReferenceRead = true,
  LspReferenceWrite = true,
  LspSignatureActiveParameter = true,

  -- Telescope
  TelescopePromptTitle = true,
  TelescopePreviewTitle = true,
  TelescopeResultsTitle = true,
  TelescopeSelection = true,
  TelescopeSelectionCaret = true,
}

Example configuration with lazy.nvim:

require("lazy").setup({
  {
    "jackplus-xyz/binary.nvim",
    opts = {
      style = "light",
      colors = {
        fg = "#FFB400",
      },
      -- Customize the reversed groups
      reversed_group = {
        Title = true,  -- Add a new reversed group
        Search = false, -- Disable a default reversed group
      },
    },
  },
})

Usage

Once installed, simply set the color scheme in your Neovim configuration:

vim.cmd("colorscheme binary")

You can dynamically change the style and colors by updating the configuration:

require("binary").setup({
  style = "dark",
  colors = {
    fg = "#ffffff",
    bg = "#000000",
  },
})

How it works

binary.nvim brute force a two-color scheme by:

  1. Overrides all highlight groups to use only the configured fg and bg.
  2. Allows selected groups to reverse their colors for improved readability.
  3. Adapts to different styles (light or dark) by swapping fg and bg.

Credits

License

MIT

About

A minmal Neovim colorscheme using only two colors for a plain text editor experience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages