pojokcodeid.nvim-lazy/lua/plugins/colorscheme.lua

514 lines
14 KiB
Lua
Raw Normal View History

2023-03-04 11:53:44 +07:00
local gruvbox = true
local dracula = false
local tokyonight = false
local nord = false
local sonokai = false
local lunar = false
local material = false
local onedark = false
local catppuccin = false
2023-03-05 10:49:03 +07:00
local nightfox = false
local sonokai_style = "default"
local material_style = "oceanic"
local onedark_style = "dark"
2023-03-04 11:53:44 +07:00
_G.switch = function(param, case_table)
local case = case_table[param]
if case then
return case()
end
local def = case_table["default"]
return def and def() or nil
end
local data_exists, config = pcall(require, "core.config")
2023-03-04 11:53:44 +07:00
if data_exists then
if config.colorscheme ~= nil then
local color = config.colorscheme
2023-03-04 11:53:44 +07:00
switch(color, {
["tokyonight"] = function()
gruvbox = false
tokyonight = true
end,
["tokyonight-night"] = function()
gruvbox = false
tokyonight = true
end,
["tokyonight-storm"] = function()
gruvbox = false
tokyonight = true
end,
["tokyonight-day"] = function()
gruvbox = false
tokyonight = true
end,
["tokyonight-moon"] = function()
gruvbox = false
tokyonight = true
end,
["sonokai"] = function()
gruvbox = false
sonokai = true
2023-03-05 10:49:03 +07:00
sonokai_style = "default"
end,
["sonokai_atlantis"] = function()
gruvbox = false
sonokai = true
sonokai_style = "atlantis"
end,
["sonokai_andromeda"] = function()
gruvbox = false
sonokai = true
sonokai_style = "andromeda"
end,
["sonokai_shusia"] = function()
gruvbox = false
sonokai = true
sonokai_style = "shusia"
end,
["sonokai_maia"] = function()
gruvbox = false
sonokai = true
sonokai_style = "maia"
end,
["sonokai_espresso"] = function()
gruvbox = false
sonokai = true
sonokai_style = "espresso"
2023-03-04 11:53:44 +07:00
end,
["material"] = function()
gruvbox = false
material = true
end,
2023-03-05 10:49:03 +07:00
["material_deepocean"] = function()
gruvbox = false
material = true
material_style = "deep ocean"
end,
["material_palenight"] = function()
gruvbox = false
material = true
material_style = "palenight"
end,
["material_lighter"] = function()
gruvbox = false
material = true
material_style = "lighter"
end,
["material_darker"] = function()
gruvbox = false
material = true
material_style = "darker"
end,
2023-03-04 11:53:44 +07:00
["onedark"] = function()
gruvbox = false
onedark = true
end,
2023-03-05 10:49:03 +07:00
["onedark_darker"] = function()
gruvbox = false
onedark = true
onedark_style = "darker"
end,
["onedark_cool"] = function()
gruvbox = false
onedark = true
onedark_style = "cool"
end,
["onedark_deep"] = function()
gruvbox = false
onedark = true
onedark_style = "deep"
end,
["onedark_warm"] = function()
gruvbox = false
onedark = true
onedark_style = "warm"
end,
["onedark_warmer"] = function()
gruvbox = false
onedark = true
onedark_style = "warmer"
end,
["onedark_light"] = function()
gruvbox = false
onedark = true
onedark_style = "light"
end,
2023-03-04 11:53:44 +07:00
["lunar"] = function()
gruvbox = false
lunar = true
end,
["nord"] = function()
gruvbox = false
nord = true
end,
["catppuccin"] = function()
gruvbox = false
catppuccin = true
end,
2023-03-05 10:49:03 +07:00
["catppuccin-latte"] = function()
gruvbox = false
catppuccin = true
end,
["catppuccin-frappe"] = function()
gruvbox = false
catppuccin = true
end,
["catppuccin-macchiato"] = function()
gruvbox = false
catppuccin = true
end,
["catppuccin-mocha"] = function()
gruvbox = false
catppuccin = true
end,
2023-03-04 11:53:44 +07:00
["dracula"] = function()
gruvbox = false
dracula = true
end,
2023-03-05 10:49:03 +07:00
["nightfox"] = function()
gruvbox = false
nightfox = true
end,
["dayfox"] = function()
gruvbox = false
nightfox = true
end,
["dawnfox"] = function()
gruvbox = false
nightfox = true
end,
["duskfox"] = function()
gruvbox = false
nightfox = true
end,
["nordfox"] = function()
gruvbox = false
nightfox = true
end,
["terafox"] = function()
gruvbox = false
nightfox = true
end,
["carbonfox"] = function()
gruvbox = false
nightfox = true
end,
2023-03-04 11:53:44 +07:00
["gruvbox-baby"] = function()
gruvbox = true
end,
default = function()
gruvbox = true
end,
})
end
end
2023-03-04 16:26:54 +07:00
local transparent = false
local transparent_mode = config.transparent_mode
2023-03-04 16:26:54 +07:00
if transparent_mode ~= nil then
if transparent_mode == 1 then
transparent = true
end
end
2023-03-04 11:53:44 +07:00
return {
-- color scheme
{ "luisiacc/gruvbox-baby", lazy = true, enabled = gruvbox },
2023-03-04 18:36:14 +07:00
{
"Mofiqul/dracula.nvim",
enabled = dracula,
config = function()
2024-03-09 15:42:18 +07:00
local is_transparent = false
local colors = require("dracula").colors()
if is_transparent then
colors = {
bg = "none",
}
end
2023-03-04 18:36:14 +07:00
require("dracula").setup({
colors = {
2023-03-22 22:58:52 +07:00
-- purple = "#FCC76A",
2024-03-09 15:42:18 +07:00
menu = colors.bg,
2023-03-04 18:36:14 +07:00
},
2024-02-23 19:49:22 +07:00
italic_comment = true,
2024-03-09 15:42:18 +07:00
lualine_bg_color = colors.bg,
2023-03-22 22:58:52 +07:00
overrides = {
2024-03-11 21:07:15 +07:00
Keywords = { fg = colors.cyan, italic = true },
2024-03-12 05:39:12 +07:00
-- Function = { fg = colors.yellow, italic = true },
2024-03-11 21:07:15 +07:00
["@keyword"] = { fg = colors.pink, italic = true },
["@keyword.function"] = { fg = colors.cyan, italic = true },
["@function"] = { fg = colors.green, italic = true },
2024-03-13 07:12:04 +07:00
["@tag.attribute"] = { fg = colors.green, italic = true },
2024-03-09 22:23:41 +07:00
NvimTreeFolderIcon = { fg = "#6776a7" },
2024-02-23 19:49:22 +07:00
CmpItemAbbr = { fg = "#ABB2BF" },
CmpItemKind = { fg = "#ABB2BF" },
CmpItemAbbrDeprecated = { fg = "#ABB2BF" },
CmpItemAbbrMatch = { fg = "#8BE9FD" },
2024-03-09 15:05:09 +07:00
htmlLink = { fg = "#BD93F9", underline = false },
2024-02-23 19:49:22 +07:00
Underlined = { fg = "#8BE9FD" },
NvimTreeSpecialFile = { fg = "#FF79C6" },
MatchParen = { fg = "#F8F8F2" },
SpellBad = { fg = "#FF6E6E" },
2024-03-09 15:05:09 +07:00
illuminatedWord = { bg = "#3b4261" },
illuminatedCurWord = { bg = "#3b4261" },
IlluminatedWordText = { bg = "#3b4261" },
IlluminatedWordRead = { bg = "#3b4261" },
IlluminatedWordWrite = { bg = "#3b4261" },
2024-03-09 15:42:18 +07:00
StatusLine = { fg = "#f8f8f2", bg = colors.bg },
StatusLineTerm = { fg = "#f8f8f2", bg = colors.bg },
BufferLineFill = { bg = colors.bg },
2024-03-10 20:32:59 +07:00
Pmenu = { fg = colors.white, bg = colors.bg },
2023-03-22 22:58:52 +07:00
},
2023-03-04 18:36:14 +07:00
transparent_bg = transparent,
2024-03-09 15:42:18 +07:00
-- transparent_bg = is_transparent,
2023-03-04 18:36:14 +07:00
})
end,
},
2023-03-04 12:30:04 +07:00
{
"folke/tokyonight.nvim",
enabled = tokyonight,
config = function()
require("user.tokyonight")
end,
},
2023-03-04 18:36:14 +07:00
{
"shaunsingh/nord.nvim",
enabled = nord,
config = function()
vim.g.nord_disable_background = transparent
require("nord").set()
end,
},
2023-03-05 10:49:03 +07:00
{
"sainnhe/sonokai",
enabled = sonokai,
config = function()
vim.g.sonokai_style = sonokai_style
end,
},
2023-03-04 11:53:44 +07:00
{ "lunarvim/lunar.nvim", enabled = lunar },
{
"marko-cerovac/material.nvim",
enabled = material,
config = function()
2024-03-09 16:16:10 +07:00
local colors = require("material.colors")
2023-03-05 10:49:03 +07:00
vim.g.material_style = material_style
2023-03-04 11:53:44 +07:00
require("material").setup({
lualine_style = "stealth",
2023-03-04 16:26:54 +07:00
disable = {
background = transparent,
},
2024-03-09 16:16:10 +07:00
plugins = { -- Uncomment the plugins that you use to highlight them
-- Available plugins:
"dap",
-- "dashboard",
-- "eyeliner",
"fidget",
-- "flash",
-- "gitsigns",
-- "harpoon",
-- "hop",
"illuminate",
"indent-blankline",
-- "lspsaga",
"mini",
-- "neogit",
-- "neotest",
-- "neo-tree",
-- "neorg",
"noice",
"nvim-cmp",
"nvim-navic",
"nvim-tree",
"nvim-web-devicons",
-- "rainbow-delimiters",
-- "sneak",
"telescope",
-- "trouble",
"which-key",
"nvim-notify",
},
custom_highlights = {
BufferLineFill = { bg = colors.bg },
StatusLine = { fg = "#f8f8f2", bg = colors.bg },
StatusLineTerm = { fg = "#f8f8f2", bg = colors.bg },
},
2023-03-04 11:53:44 +07:00
})
end,
},
{
"navarasu/onedark.nvim",
enabled = onedark,
priority = 1000,
config = function()
-- Lua
require("onedark").setup({
term_colors = true,
2023-03-05 10:49:03 +07:00
style = onedark_style,
2024-03-09 22:23:41 +07:00
colors = {
2024-03-13 07:12:04 +07:00
green = "#99c379",
gray = "#8094b4",
red = "#e06c75",
purple = "#c678dd",
yellow = "#e5c07a",
blue = "#61afef",
cyan = "#56b6c2",
2024-03-09 22:23:41 +07:00
bg_d = "$bg",
2024-03-13 07:12:04 +07:00
bg1 = "#282c34",
},
code_style = {
comments = "italic",
keywords = "italic",
functions = "none",
strings = "none",
variables = "none",
2024-03-09 22:23:41 +07:00
},
2023-03-23 16:20:51 +07:00
highlights = {
2024-03-15 23:10:04 +07:00
-- BorderBG = { fg = "#333842" }, -- untuk custom brder color cmp
2024-03-13 19:33:59 +07:00
-- overide indent line fill color
NvimTreeNormal = { fg = "$fg", bg = "$bg0" },
NvimTreeIndentMarker = { fg = "#3E4450" },
IblIndent = { fg = "#3E4450" },
2024-03-13 07:12:04 +07:00
["@markup.link.url"] = { fg = "$cyan", fmt = "italic" },
["@text.uri"] = { fg = "$cyan", fmt = "none" },
["@tag.delimiter"] = { fg = "$gray" },
["@tag.html"] = { fg = "$red" },
["@tag.attribute"] = { fg = "$orange", fmt = "italic" },
["@tag.javascript"] = { fg = "$yellow" },
["@constructor.javascript"] = { fg = "$yellow" },
["@tag.tsx"] = { fg = "$yellow" },
["@constructor.tsx"] = { fg = "$yellow" },
2023-03-23 16:20:51 +07:00
-- NvimTreeFolderIcon = { fg = "#FCC76A" },
2024-03-13 07:12:04 +07:00
NvimTreeSpecialFile = { fg = "$yellow", fmt = "italic" },
BufferLineFill = { bg = "$bg0" },
2024-03-09 22:23:41 +07:00
BufferLineUnfocusedFill = { bg = "$bg0" },
StatusLine = { fg = "#f8f8f2", bg = "$bg0" },
StatusLineTerm = { fg = "#f8f8f2", bg = "$bg0" },
illuminatedWord = { bg = "#3b4261" },
illuminatedCurWord = { bg = "#3b4261" },
IlluminatedWordText = { bg = "#3b4261" },
IlluminatedWordRead = { bg = "#3b4261" },
IlluminatedWordWrite = { bg = "#3b4261" },
2024-03-13 07:12:04 +07:00
PmenuSel = { fg = "$fg", bg = "#333842" },
2024-03-10 20:32:59 +07:00
-- overide lualine fill color with bg color
LualineNormal = { bg = "$bg0" },
-- overide lualine_c fill color with bg color
LualineC = { bg = "$bg0" },
-- overide lualine_x fill color with bg color
LualineX = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKey = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKeySeperator = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKeyDesc = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKeyFloat = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKeyValue = { bg = "$bg0" },
-- overide which-key fill color with bg color
WhichKeyBorder = { bg = "$bg0" },
-- overide Lazy fill color with bg color
2024-03-11 12:29:09 +07:00
-- LazyNormal = { bg = "$bg0" },
-- -- overide lazy background color with bg color
-- LazyBackground = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH1 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH2 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH3 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH4 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH5 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyH6 = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyButton = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyButtonActive = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazySpecial = { bg = "$bg0" },
-- -- overide Lazy fill color with bg color
-- LazyProgress = { bg = "$bg0" },
-- Pmenu = { fg = "$fg", bg = "$bg0" },
2024-03-13 07:12:04 +07:00
CursorLine = { bg = "#333842" },
Cursor = { fg = "$bg0", bg = "$fg" }, -- character under the cursor
lCursor = { fg = "$bg0", bg = "$fg" }, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
CursorIM = { fg = "$bg0", bg = "$fg" }, -- like Cursor, but used when in IME mode |CursorIM|
CursorColumn = { bg = "#333842" }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
2023-03-23 16:20:51 +07:00
},
2023-03-04 16:26:54 +07:00
transparent = transparent,
lualine = {
2024-03-10 20:32:59 +07:00
transparent = true,
2023-03-04 16:26:54 +07:00
},
2023-03-04 11:53:44 +07:00
})
require("onedark").load()
end,
},
{
"catppuccin/nvim",
enabled = catppuccin,
name = "catppuccin",
init = function()
require("user.catppuccin")
end,
},
2023-03-05 10:49:03 +07:00
{
"EdenEast/nightfox.nvim",
enabled = nightfox,
config = function()
2024-03-10 07:32:28 +07:00
local palette = require("nightfox.palette").load("nightfox")
local Color = require("nightfox.lib.color")
local bg = Color.from_hex(palette.bg1)
2023-03-05 10:49:03 +07:00
require("nightfox").setup({
options = {
2024-02-28 15:02:41 +07:00
terminal_colors = true,
2023-03-05 10:49:03 +07:00
transparent = transparent,
2024-03-11 18:01:06 +07:00
styles = { -- Style to be applied to different syntax groups
comments = "italic", -- Value is any valid attr-list value `:help attr-list`
conditionals = "italic",
constants = "NONE",
functions = "italic",
keywords = "bold,italic",
numbers = "NONE",
operators = "NONE",
strings = "NONE",
types = "NONE",
variables = "NONE",
},
},
palettes = {
all = {
bg0 = palette.bg1,
bg = palette.bg1,
},
2023-03-05 10:49:03 +07:00
},
2024-03-10 07:32:28 +07:00
specs = {},
groups = {
all = {
-- overide bufferline fill color
2024-03-11 18:01:06 +07:00
BufferLineFill = { bg = palette.bg1 },
BufferLineUnfocusedFill = { bg = palette.bg },
2024-03-10 07:32:28 +07:00
-- overide nvimtree fill color with bg color
2024-03-11 18:01:06 +07:00
NvimTreeNormal = { bg = palette.bg },
NvimTreeWinSeparator = {
fg = palette.bg0,
},
Underlined = { style = "NONE" }, -- overide statusline fill color with bg color
StatusLine = { bg = "NONE" },
StatusLineTerm = { bg = palette.bg },
2024-03-10 07:32:28 +07:00
-- overide lualine fill color with bg color
2024-03-11 18:01:06 +07:00
LualineNormal = { bg = palette.bg },
Pmenu = { bg = "bg3" },
PmenuSel = { bg = "bg3" },
2024-03-10 07:32:28 +07:00
},
},
2023-03-05 10:49:03 +07:00
})
end,
},
2023-03-04 11:53:44 +07:00
}