feat(themes): add gruvbox

This commit is contained in:
Matt Leong 2021-11-12 09:27:03 -08:00
parent a76888f171
commit 0a2a946ca6
8 changed files with 159 additions and 109 deletions

View file

@ -8,7 +8,7 @@ end
-- these settings will be merged with any settings definined in config.lua
local default_config = {
-- theme = 'Catppuccino.nvim',
theme = 'nord.nvim',
theme = 'gruvbox.nvim',
lsp = {
format_on_save = true, -- true/false or table of filetypes {'.ts', '.js',}
rename_notification = true,

View file

@ -2,116 +2,17 @@ local config = require('cosmic.config')
local colors = {}
if config.theme == 'tokyonight.nvim' then
local theme = require('tokyonight.colors')
local themeColors = theme.setup()
colors = {
white = themeColors.fg_dark,
bg = themeColors.bg,
bg_highlight = themeColors.bg_highlight,
bg_dark = themeColors.bg_dark,
normal = themeColors.blue,
insert = themeColors.teal,
command = themeColors.orange,
visual = themeColors.magenta,
replace = themeColors.red,
diffAdd = themeColors.git.add,
diffModified = themeColors.git.change,
diffDeleted = themeColors.git.delete,
trace = themeColors.orange,
hint = themeColors.teal,
info = themeColors.green2,
error = themeColors.magenta2,
warn = themeColors.orange,
floatBorder = themeColors.border_highlight,
selection_caret = themeColors.purple,
}
print('loading tokyonight colors')
colors = require('cosmic.core.theme.integrated.tokyonight')
elseif config.theme == 'Catppuccino.nvim' then
local theme = require('catppuccin.core.color_palette')
colors = {
white = theme.catppuccin0,
bg = theme.catppuccin12,
bg_highlight = theme.catppuccin15,
bg_dark = theme.catppuccin14,
normal = theme.catppuccin3,
insert = theme.catppuccin4,
command = theme.catppuccin5,
visual = theme.catppuccin8,
replace = theme.catppuccin2,
diffAdd = theme.catppuccin9,
diffModified = theme.catppuccin7,
diffDeleted = theme.catppuccin5,
trace = theme.catppuccin5,
hint = theme.catppuccin10,
info = theme.catppuccin7,
error = theme.catppuccin2,
warn = theme.catppuccin5,
floatBorder = theme.catppuccin12,
selection_caret = theme.catppuccin3,
}
--[[ local color_palette = {
catppuccin0 = "#F0F0F5", -- Ghost White
catppuccin1 = "#1B1624", -- Xiketic
catppuccin2 = "#EA31B5", -- Fashion Fuchsia
catppuccin3 = "#AE9AD6", -- Blue Shell
catppuccin4 = "#F0A8E4", -- Orchid Crayola
catppuccin5 = "#E28D8D", -- New York Pink
catppuccin6 = "#E7A988", -- Tumbleweed
catppuccin7 = "#ADD692", -- Granny Smith Apple
catppuccin8 = "#F0DC89", -- Megium Champagne
catppuccin9 = "#84A5CB", -- Cerulean Frost
catppuccin10 = "#B9C4E3", -- Periwinkle Crayola
catppuccin11 = "#6F6A8A", -- Rhythm
catppuccin12 = "#3e4058", -- Independence
catppuccin13 = "#0E0C13", -- Xiketic
catppuccin14 = "#221E2F", -- Raisin Black
catppuccin15 = "#312C44", -- Space Cadet
} ]]
print('loading catpuuccino colors')
colors = require('cosmic.core.theme.integrated.catppuccin')
elseif config.theme == 'gruvbox.nvim' then
print('loading gruvbox colors')
colors = require('cosmic.core.theme.integrated.gruvbox')
elseif config.theme == 'nord.nvim' then
local theme = require('nord.colors')
local nord = {
--16 colors
nord0_gui = '#2E3440',
nord1_gui = '#3B4252',
nord2_gui = '#434C5E',
nord3_gui = '#4C566A',
nord3_gui_bright = '#616E88',
nord4_gui = '#D8DEE9',
nord5_gui = '#E5E9F0',
nord6_gui = '#ECEFF4',
nord7_gui = '#8FBCBB',
nord8_gui = '#88C0D0',
nord9_gui = '#81A1C1',
nord10_gui = '#5E81AC',
nord11_gui = '#BF616A',
nord12_gui = '#D08770',
nord13_gui = '#EBCB8B',
nord14_gui = '#A3BE8C',
nord15_gui = '#B48EAD',
none = 'NONE',
}
colors = {
white = theme.nord4_gui,
bg = theme.nord2_gui,
bg_highlight = theme.nord2_gui,
bg_dark = theme.nord0_gui,
normal = theme.nord9_gui,
insert = theme.nord14_gui,
command = theme.nord13_gui,
visual = theme.nord15_gui,
replace = theme.nord11_gui,
diffAdd = theme.nord14_gui,
diffModified = theme.nord13_gui,
diffDeleted = theme.nord11_gui,
trace = theme.nord13_gui,
hint = theme.nord8_gui,
info = theme.nord9_gui,
error = theme.nord11_gui,
warn = theme.nord13_gui,
floatBorder = theme.nord3_gui,
selection_caret = theme.nord9_gui,
}
print('loading nord colors')
colors = require('cosmic.core.theme.integrated.nord')
end
return colors

View file

@ -63,3 +63,5 @@ vim.cmd([[
highlight clear NormalFloat
highlight link NormalFloat Normal
]])
vim.o.background = 'dark'

View file

@ -0,0 +1,24 @@
local theme = require('catppuccin.core.color_palette')
local colors = {
white = theme.catppuccin0,
bg = theme.catppuccin12,
bg_highlight = theme.catppuccin15,
bg_dark = theme.catppuccin14,
normal = theme.catppuccin3,
insert = theme.catppuccin4,
command = theme.catppuccin5,
visual = theme.catppuccin8,
replace = theme.catppuccin2,
diffAdd = theme.catppuccin9,
diffModified = theme.catppuccin7,
diffDeleted = theme.catppuccin5,
trace = theme.catppuccin5,
hint = theme.catppuccin10,
info = theme.catppuccin7,
error = theme.catppuccin2,
warn = theme.catppuccin5,
floatBorder = theme.catppuccin12,
selection_caret = theme.catppuccin3,
}
return colors

View file

@ -0,0 +1,64 @@
--[[ {
dark0_hard = hsl("#1d2021"),
dark0 = hsl("#282828"),
dark0_soft = hsl("#32302f"),
dark1 = hsl("#3c3836"),
dark2 = hsl("#504945"),
dark3 = hsl("#665c54"),
dark4 = hsl("#7c6f64"),
light0_hard = hsl("#f9f5d7"),
light0 = hsl("#fbf1c7"),
light0_soft = hsl("#f2e5bc"),
light1 = hsl("#ebdbb2"),
light2 = hsl("#d5c4a1"),
light3 = hsl("#bdae93"),
light4 = hsl("#a89984"),
bright_red = hsl("#fb4934"),
bright_green = hsl("#b8bb26"),
bright_yellow = hsl("#fabd2f"),
bright_blue = hsl("#83a598"),
bright_purple = hsl("#d3869b"),
bright_aqua = hsl("#8ec07c"),
bright_orange = hsl("#fe8019"),
neutral_red = hsl("#cc241d"),
neutral_green = hsl("#98971a"),
neutral_yellow = hsl("#d79921"),
neutral_blue = hsl("#458588"),
neutral_purple = hsl("#b16286"),
neutral_aqua = hsl("#689d6a"),
neutral_orange = hsl("#d65d0e"),
faded_red = hsl("#9d0006"),
faded_green = hsl("#79740e"),
faded_yellow = hsl("#b57614"),
faded_blue = hsl("#076678"),
faded_purple = hsl("#8f3f71"),
faded_aqua = hsl("#427b58"),
faded_orange = hsl("#af3a03"),
gray = hsl("#928374"),
} ]]
local theme = require('gruvbox.colors')
local convert = require('lush.hsl.convert')
local colors = {
white = convert.hsl_to_hex(theme.light0_hard),
bg = convert.hsl_to_hex(theme.dark0),
bg_highlight = convert.hsl_to_hex(theme.dark1),
bg_dark = convert.hsl_to_hex(theme.dark2),
normal = convert.hsl_to_hex(theme.neutral_yellow),
insert = convert.hsl_to_hex(theme.neutral_green),
command = convert.hsl_to_hex(theme.neutral_orange),
visual = convert.hsl_to_hex(theme.neutral_purple),
replace = convert.hsl_to_hex(theme.neutral_red),
diffAdd = convert.hsl_to_hex(theme.neutral_green),
diffModified = convert.hsl_to_hex(theme.neutral_orange),
diffDeleted = convert.hsl_to_hex(theme.neutral_red),
trace = convert.hsl_to_hex(theme.neutral_orange),
hint = convert.hsl_to_hex(theme.neutral_blue),
info = convert.hsl_to_hex(theme.neutral_green),
error = convert.hsl_to_hex(theme.neutral_red),
warn = convert.hsl_to_hex(theme.neutral_orange),
floatBorder = convert.hsl_to_hex(theme.dark3),
selection_caret = convert.hsl_to_hex(theme.neutral_blue),
}
return colors

View file

@ -0,0 +1,23 @@
local theme = require('nord.colors')
local colors = {
white = theme.nord4_gui,
bg = theme.nord2_gui,
bg_highlight = theme.nord2_gui,
bg_dark = theme.nord0_gui,
normal = theme.nord9_gui,
insert = theme.nord14_gui,
command = theme.nord13_gui,
visual = theme.nord15_gui,
replace = theme.nord11_gui,
diffAdd = theme.nord14_gui,
diffModified = theme.nord13_gui,
diffDeleted = theme.nord11_gui,
trace = theme.nord13_gui,
hint = theme.nord8_gui,
info = theme.nord9_gui,
error = theme.nord11_gui,
warn = theme.nord13_gui,
floatBorder = theme.nord3_gui,
selection_caret = theme.nord9_gui,
}
return colors

View file

@ -0,0 +1,26 @@
local theme = require('tokyonight.colors')
local themeColors = theme.setup()
local colors = {
white = themeColors.fg_dark,
bg = themeColors.bg,
bg_highlight = themeColors.bg_highlight,
bg_dark = themeColors.bg_dark,
normal = themeColors.blue,
insert = themeColors.teal,
command = themeColors.orange,
visual = themeColors.magenta,
replace = themeColors.red,
diffAdd = themeColors.git.add,
diffModified = themeColors.git.change,
diffDeleted = themeColors.git.delete,
trace = themeColors.orange,
hint = themeColors.teal,
info = themeColors.green2,
error = themeColors.magenta2,
warn = themeColors.orange,
floatBorder = themeColors.border_highlight,
selection_caret = themeColors.purple,
}
return colors

View file

@ -61,6 +61,16 @@ return packer.startup(function()
disable = config.theme ~= 'nord.nvim',
})
use({
'ellisonleao/gruvbox.nvim',
requires = { 'rktjmp/lush.nvim' },
config = function()
vim.o.background = 'dark'
vim.cmd([[colorscheme gruvbox]])
end,
disable = config.theme ~= 'gruvbox.nvim',
})
use({
'rcarriga/nvim-notify',
config = function()