Git Product home page Git Product logo

nvim-synth's Introduction

Noirbuddy

A highly customizable minimalist monochromatic colorscheme for Neovim ๐Ÿ–ค

Built on colorbuddy.nvim, with a monochromatic base palette, and the ability to set a flavor color or two ๐Ÿ’…

Installation

  1. Install using your favourite package manager:

    Note: You'll need to use colorbuddy's dev branch for now, but that'll change to master in time...

    Using packer.nvim:

    use {
      "jesseleite/nvim-noirbuddy",
      requires = { "tjdevries/colorbuddy.nvim", branch = "dev" }
    }

    Using vim-plug:

    Plug 'tjdevries/colorbuddy.nvim', { 'branch': 'dev' }
    Plug 'jesseleite/nvim-noirbuddy'
  2. Enable the colorscheme in your lua config:

    require("noirbuddy").setup()
  3. Order pizza! ๐Ÿ• ๐Ÿค˜ ๐Ÿ˜Ž

Selecting Presets

The default minimal preset consists of a monochromatic grayscale palette with one sexy primary color.

You can select from one of the bundled presets like so:

require('noirbuddy').setup {
  preset = 'miami-nights',
}

Available Presets

Customizing Your Theme

You can configure a custom primary color like so:

require('noirbuddy').setup {
  colors = {
    primary = '#6EE2FF',
  },
}

For a more duotone look, you can configure a secondary color:

require('noirbuddy').setup {
  colors = {
    primary = '#6EE2FF',
    secondary = '#267FB5',
  },
}

You can also customize the background color:

require('noirbuddy').setup {
  colors = {
    background = '#18181A',
  },
}

Or even the base grayscale palette:

require("noirbuddy").setup {
  colors = {
    noir_0 = '#ffffff', -- `noir_0` is light for dark themes, and dark for light themes
    noir_1 = '#f5f5f5',
    noir_2 = '#d5d5d5',
    noir_3 = '#b4b4b4',
    noir_4 = '#a7a7a7',
    noir_5 = '#949494',
    noir_6 = '#737373',
    noir_7 = '#535353',
    noir_8 = '#323232',
    noir_9 = '#212121', -- `noir_9` is dark for dark themes, and light for light themes
  },
}

Customizing Semantic Colors

You may wish to configure specific colors for things that have semantic meaning (ie. red for errors, orange for warnings, etc.), in a way that won't change as you switch between presets:

require("noirbuddy").setup {
  colors = {
    diagnostic_error = '#EC0034',
    diagnostic_warning = '#ff7700',
    diagnostic_info = '#d5d5d5',
    diagnostic_hint = '#f5f5f5',
    diff_add = '#f5f5f5',
    diff_change = '#737373',
    diff_delete = '#EC0034',
  },
}

Customizing Font Styles

Some highlight groups (ie. inline diagnostics) are set up so that you can opt-in to certain font styles (though which styles completely depends on the highlight group, and these are all disabled by default):

require("noirbuddy").setup {
  styles = {
    italic = true,
    bold = false,
    underline = false,
    undercurl = true,
  },
}

If you want more granular control over font styles, check out the customizing highlight grups section.

Customizing Third Party Plugins

Included Configs

Noirbuddy automatically themes several plugins out of the box (ie. telescope.nvim, vim-fugitive, harpoon, etc.), but also allows for customizing highlight groups and exporting colors so that you can have full control over every aspect when it comes to theming third party plugins.

Opt-In Configs

Though most are automatic, certain plugins may require you to opt-in...

  • Lualine.nvim

    local noirbuddy_lualine = require('noirbuddy.plugins.lualine')
    
    require('lualine').setup {
      options = {
        theme = noirbuddy_lualine.theme,
        -- ...
      },
      sections = noirbuddy_lualine.sections,
      inactive_sections = noirbuddy_lualine.inactive_sections,
      -- ...
    }

    Check out @n1ghtmare's lualine config for a fully fleshed out lualine example!

Contributions

If you use a plugin that you think should be included in this repo, PR's are welcome ๐Ÿค˜

Customizing Highlight Groups

Since Noirbuddy is built on colorbuddy.nvim, you can use its API to customize specific highlight groups as needed:

-- Require colorbuddy...
local Color, colors, Group, groups, styles = require('colorbuddy').setup {}

-- Override specific highlight groups...
Group.new('TelescopeTitle', colors.primary)
Group.new('TelescopeBorder', colors.secondary)
Group.new('CursorLineNr', colors.primary, colors.noir_9)
Group.new('Searchlight', nil, colors.secondary)
Group.new('@comment', colors.noir_7)
Group.new('@punctuation', colors.noir_2)

-- Add font styles to highlight groups...
Group.new('@constant', colors.noir_2, nil, styles.bold)
Group.new('@method', colors.noir_0, nil, styles.bold + styles.italic)

-- Link highlight groups...
Group.link('SignifySignAdd', groups.DiffAdd)
Group.link('SignifySignChange', groups.DiffChange)
Group.link('SignifySignDelete', groups.DiffDelete)

-- etc.

Exporting Colors

If you need access to Noirbuddy's raw color codes for other plugin configs:

-- Export noirbuddy colors...
local noirbuddy = require('noirbuddy.colors').all()

-- Outputs a simple lua table...
-- {
--   primary = "#e4609b",
--   secondary = "#47bac0",
--   background = "#18181a",
--   noir_0 = "#ffffff",
--   noir_1 = "#f5f5f5",
--   noir_2 = "#d5d5d5",
--   -- etc.
-- }

You can run :lua print(vim.inspect(require('noirbuddy.colors').all())) to see a full list of what is exported.

Thank You!

  • Dimitar Dimitrov for your contributions, slick ideas, and teamwork (this project is actually a spiritual successor to his awesome noirblaze colorscheme) ๐Ÿ’ช

  • TJ DeVries for your incredible work on colorbuddy.nvim (and all things Neovim for that matter) ๐Ÿค˜

nvim-synth's People

Contributors

jesseleite avatar kborling avatar n1ghtmare avatar rareconf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.