Skip to content

Commit

Permalink
perf(colorscheme): use gruvbox
Browse files Browse the repository at this point in the history
  • Loading branch information
liubang committed May 5, 2024
1 parent 17678db commit e519a33
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 135 deletions.
2 changes: 1 addition & 1 deletion lua/plugins/bufferline-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ return {
bufferline.style_preset.no_italic,
bufferline.style_preset.no_bold,
}
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
-- opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
bufferline.setup(opts)
end,
keys = {
Expand Down
66 changes: 27 additions & 39 deletions lua/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
-- Authors: liubang ([email protected])

return {
{ "norcalli/nvim-colorizer.lua", enabled = false, event = { "VeryLazy" } },
{
"catppuccin/nvim",
priority = 150,
lazy = false,
enabled = false,
name = "catppuccin",
config = function()
require("catppuccin").setup({
Expand Down Expand Up @@ -129,47 +131,25 @@ return {
highlight_overrides = {
all = function(colors)
return {
CmpItemMenu = { fg = colors.surface2 },
CmpItemMenu = { fg = colors.surface1 },
CursorLineNr = { fg = colors.text },
FloatBorder = { bg = colors.base, fg = colors.surface0 },
FloatBorder = { bg = colors.base, fg = colors.surface1 },
GitSignsChange = { fg = colors.peach },
LineNr = { fg = colors.overlay0 },
LspInfoBorder = { link = "FloatBorder" },
NeoTreeDirectoryIcon = { fg = colors.subtext1 },
NeoTreeDirectoryName = { fg = colors.subtext1 },
NeoTreeFloatBorder = { link = "TelescopeResultsBorder" },
NeoTreeGitConflict = { fg = colors.red },
NeoTreeGitDeleted = { fg = colors.red },
NeoTreeGitIgnored = { fg = colors.overlay0 },
NeoTreeGitModified = { fg = colors.peach },
NeoTreeGitStaged = { fg = colors.green },
NeoTreeGitUnstaged = { fg = colors.red },
NeoTreeGitUntracked = { fg = colors.green },
NeoTreeIndent = { fg = colors.surface1 },
NeoTreeNormal = { bg = colors.mantle },
NeoTreeNormalNC = { bg = colors.mantle },
NeoTreeRootName = { fg = colors.subtext1, style = { "bold" } },
NeoTreeTabActive = { fg = colors.text, bg = colors.mantle },
NeoTreeTabInactive = { fg = colors.surface2, bg = colors.crust },
NeoTreeTabSeparatorActive = { fg = colors.mantle, bg = colors.mantle },
NeoTreeTabSeparatorInactive = { fg = colors.crust, bg = colors.crust },
NeoTreeWinSeparator = { fg = colors.base, bg = colors.base },
NormalFloat = { bg = colors.base },
Pmenu = { bg = colors.mantle, fg = "" },
PmenuSel = { bg = colors.surface0, fg = "" },
VertSplit = { bg = colors.base, fg = colors.surface0 },
WhichKeyFloat = { bg = colors.mantle },
YankHighlight = { bg = colors.surface2 },
YankHighlight = { bg = colors.red },
YankyPut = { bg = colors.red },
YankyYanked = { bg = colors.red },
FidgetTask = { fg = colors.subtext1 },
FidgetTitle = { fg = colors.peach },

IblIndent = { fg = colors.surface0 },
IblScope = { fg = colors.overlay0 },

Boolean = { fg = colors.mauve },
Number = { fg = colors.mauve },
Float = { fg = colors.mauve },

PreProc = { fg = colors.mauve },
PreCondit = { fg = colors.mauve },
Include = { fg = colors.mauve },
Expand All @@ -180,7 +160,6 @@ return {
Typedef = { fg = colors.red },
Exception = { fg = colors.red },
Statement = { fg = colors.red },

Error = { fg = colors.red },
StorageClass = { fg = colors.peach },
Tag = { fg = colors.peach },
Expand All @@ -190,12 +169,15 @@ return {
Title = { fg = colors.peach },
Special = { fg = colors.yellow },
SpecialChar = { fg = colors.yellow },
Type = { fg = colors.yellow, style = { "bold" } },
Function = { fg = colors.green, style = { "bold" } },
Type = {
fg = colors.yellow, --[[ style = { "bold" } ]]
},
Function = {
fg = colors.green, --[[ style = { "bold" } ]]
},
Delimiter = { fg = colors.subtext1 },
Ignore = { fg = colors.subtext1 },
Macro = { fg = colors.teal },

TSAnnotation = { fg = colors.mauve },
TSAttribute = { fg = colors.mauve },
TSBoolean = { fg = colors.mauve },
Expand Down Expand Up @@ -256,14 +238,21 @@ return {
TSTextReference = { link = "Constant" },
TSTitle = { link = "Title" },
TSTodo = { link = "Todo" },
TSType = { fg = colors.yellow, style = { "bold" } },
TSTypeBuiltin = { fg = colors.yellow, style = { "bold" } },
TSTypeDefinition = { fg = colors.yellow, style = { "bold" } },
TSTypeQualifier = { fg = colors.peach, style = { "bold" } },
TSType = {
fg = colors.yellow, --[[ style = { "bold" } ]]
},
TSTypeBuiltin = {
fg = colors.yellow, --[[ style = { "bold" } ]]
},
TSTypeDefinition = {
fg = colors.yellow, --[[ style = { "bold" } ]]
},
TSTypeQualifier = {
fg = colors.peach, --[[ style = { "bold" } ]]
},
TSURI = { fg = colors.blue },
TSVariable = { fg = colors.text },
TSVariableBuiltin = { fg = colors.mauve },

["@annotation"] = { link = "TSAnnotation" },
["@attribute"] = { link = "TSAttribute" },
["@boolean"] = { link = "TSBoolean" },
Expand Down Expand Up @@ -376,7 +365,6 @@ return {
return {
IblIndent = { fg = colors.mantle },
IblScope = { fg = colors.surface1 },

LineNr = { fg = colors.surface1 },
}
end,
Expand All @@ -386,13 +374,13 @@ return {
vim.api.nvim_set_hl(0, "NavicText", { default = true, bg = "none", fg = "#eedaad" })
vim.api.nvim_set_hl(0, "NavicSeparator", { default = true, bg = "none", fg = "#eedaad" })
--
vim.api.nvim_command("colorscheme catppuccin")
-- vim.api.nvim_command("colorscheme catppuccin")
end,
},
{
"sainnhe/gruvbox-material", -- {{{
lazy = false,
enabled = false,
enabled = true,
priority = 1000,
config = function()
vim.o.background = "dark"
Expand Down
182 changes: 91 additions & 91 deletions lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,97 +156,97 @@ function M.config()
telescope.load_extension("tasks")
telescope.load_extension("undo")

-- local colors = { --{{{
-- white = "#ebdbb2",
-- darker_black = "#222222",
-- black = "#282828", -- nvim bg
-- black2 = "#3c3836",
-- one_bg = "#323232",
-- one_bg2 = "#3b3b3b",
-- one_bg3 = "#434343",
-- grey = "#505050",
-- grey_fg = "#5a5a5a",
-- grey_fg2 = "#646464",
-- light_grey = "#6c6c6c",
-- red = "#ea6962",
-- baby_pink = "#ce8196",
-- pink = "#ff75a0",
-- line = "#373737", -- for lines like vertsplit
-- green = "#89b482",
-- vibrant_green = "#a9b665",
-- nord_blue = "#6f8faf",
-- blue = "#6d8dad",
-- yellow = "#d8a657",
-- sun = "#eab869",
-- purple = "#d3869b",
-- dark_purple = "#d3869b",
-- teal = "#749689",
-- orange = "#e78a4e",
-- cyan = "#89b482",
-- statusline_bg = "#2c2c2c",
-- lightbg = "#393939",
-- pmenu_bg = "#89b482",
-- folder_bg = "#6d8dad",
-- } --}}}

-- -- colors {{{
-- local TelescopePrompt = { --{{{
-- TelescopeBorder = {
-- fg = colors.darker_black,
-- bg = colors.darker_black,
-- },
--
-- TelescopePromptBorder = {
-- fg = colors.black2,
-- bg = colors.black2,
-- },
--
-- TelescopePromptNormal = {
-- fg = colors.white,
-- bg = colors.black2,
-- },
--
-- TelescopePromptPrefix = {
-- fg = colors.red,
-- bg = colors.black2,
-- },
--
-- TelescopeNormal = { bg = colors.darker_black },
--
-- TelescopePreviewTitle = {
-- fg = colors.black,
-- bg = colors.green,
-- },
--
-- TelescopePromptTitle = {
-- fg = colors.black,
-- bg = colors.red,
-- },
--
-- TelescopeResultsTitle = {
-- fg = colors.darker_black,
-- bg = colors.darker_black,
-- },
--
-- TelescopeSelection = { bg = colors.black2, fg = colors.white },
--
-- TelescopeResultsDiffAdd = {
-- fg = colors.green,
-- },
--
-- TelescopeResultsDiffChange = {
-- fg = colors.yellow,
-- },
--
-- TelescopeResultsDiffDelete = {
-- fg = colors.red,
-- },
-- } --}}}
--
-- for hl, col in pairs(TelescopePrompt) do
-- vim.api.nvim_set_hl(0, hl, col)
-- end
-- -- }}}
local colors = { --{{{
white = "#ebdbb2",
darker_black = "#222222",
black = "#282828", -- nvim bg
black2 = "#3c3836",
one_bg = "#323232",
one_bg2 = "#3b3b3b",
one_bg3 = "#434343",
grey = "#505050",
grey_fg = "#5a5a5a",
grey_fg2 = "#646464",
light_grey = "#6c6c6c",
red = "#ea6962",
baby_pink = "#ce8196",
pink = "#ff75a0",
line = "#373737", -- for lines like vertsplit
green = "#89b482",
vibrant_green = "#a9b665",
nord_blue = "#6f8faf",
blue = "#6d8dad",
yellow = "#d8a657",
sun = "#eab869",
purple = "#d3869b",
dark_purple = "#d3869b",
teal = "#749689",
orange = "#e78a4e",
cyan = "#89b482",
statusline_bg = "#2c2c2c",
lightbg = "#393939",
pmenu_bg = "#89b482",
folder_bg = "#6d8dad",
} --}}}

-- colors {{{
local TelescopePrompt = { --{{{
TelescopeBorder = {
fg = colors.darker_black,
bg = colors.darker_black,
},

TelescopePromptBorder = {
fg = colors.black2,
bg = colors.black2,
},

TelescopePromptNormal = {
fg = colors.white,
bg = colors.black2,
},

TelescopePromptPrefix = {
fg = colors.red,
bg = colors.black2,
},

TelescopeNormal = { bg = colors.darker_black },

TelescopePreviewTitle = {
fg = colors.black,
bg = colors.green,
},

TelescopePromptTitle = {
fg = colors.black,
bg = colors.red,
},

TelescopeResultsTitle = {
fg = colors.darker_black,
bg = colors.darker_black,
},

TelescopeSelection = { bg = colors.black2, fg = colors.white },

TelescopeResultsDiffAdd = {
fg = colors.green,
},

TelescopeResultsDiffChange = {
fg = colors.yellow,
},

TelescopeResultsDiffDelete = {
fg = colors.red,
},
} --}}}

for hl, col in pairs(TelescopePrompt) do
vim.api.nvim_set_hl(0, hl, col)
end
-- }}}
end

return M
Expand Down
5 changes: 1 addition & 4 deletions lua/plugins/yanky-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ return {
highlight = {
on_put = true,
on_yank = true,
timer = 300,
},
preserve_cursor_position = {
enabled = true,
timer = 350,
},
ring = { storage = jit.os:find("Windows") and "shada" or "sqlite" },
},
Expand Down

0 comments on commit e519a33

Please sign in to comment.