Skip to content

tjdevries/colorbuddy.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8b96858 Â· May 8, 2024

History

68 Commits
Jun 30, 2020
Mar 15, 2024
Mar 15, 2024
Mar 20, 2024
Apr 16, 2021
Apr 16, 2021
Nov 11, 2017
Mar 15, 2024
Nov 8, 2017
Apr 16, 2021
May 8, 2024
Apr 16, 2021
Mar 15, 2024
Mar 15, 2024
Apr 16, 2021

Repository files navigation

colorbuddy.nvim

NOTE: now requires neovim 0.9 or nightly

(If you were using old version, you can use the tag v1.0.0)

A colorscheme helper for Neovim.

Written in Lua! Quick & Easy Color Schemes 😄

Sincerely, your color buddy.

Installation

Install the plugin with your preferred package manager:

-- Lua
{
  "tjdevries/colorbuddy.nvim",
}
use "tjdevries/colorbuddy.nvim"
Plug 'tjdevries/colorbuddy.nvim'

Basic Usage

vim.cmd.colorscheme("colorbuddy")
-- or
vim.cmd.colorscheme("gruvbuddy")

Example

Your color buddy for making cool neovim color schemes. Write your colorscheme in lua!

You can see one example for gruvbox-esque styles here.

Example:

-- file: colors/my-colorscheme-name.lua

local colorbuddy = require('colorbuddy')

-- Set up your custom colorscheme if you want
colorbuddy.colorscheme("my-colorscheme-name")

-- And then modify as you like
local Color = colorbuddy.Color
local colors = colorbuddy.colors
local Group = colorbuddy.Group
local groups = colorbuddy.groups
local styles = colorbuddy.styles

-- Use Color.new(<name>, <#rrggbb>) to create new colors
-- They can be accessed through colors.<name>
Color.new('background',  '#282c34')
Color.new('red',         '#cc6666')
Color.new('green',       '#99cc99')
Color.new('yellow',      '#f0c674')

-- Define highlights in terms of `colors` and `groups`
Group.new('Function'        , colors.yellow      , colors.background , styles.bold)
Group.new('luaFunctionCall' , groups.Function    , groups.Function   , groups.Function)

-- Define highlights in relative terms of other colors
Group.new('Error'           , colors.red:light() , nil               , styles.bold)

-- If you want multiple styles, just add them!
Group.new('italicBoldFunction', colors.green, groups.Function, styles.bold + styles.italic)

-- If you want the same style as a different group, but without a style: just subtract it!
Group.new('boldFunction', colors.yellow, colors.background, groups.italicBoldFunction - styles.italic)

Made with Colorbuddy

See the wiki!

About

Your color buddy for making cool neovim color schemes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages