-
Notifications
You must be signed in to change notification settings - Fork 460
/
catppuccin.lua
183 lines (170 loc) · 5.45 KB
/
catppuccin.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
return function()
local transparent_background = require("core.settings").transparent_background
local clear = {}
require("modules.utils").load_plugin("catppuccin", {
background = { light = "latte", dark = "mocha" }, -- latte, frappe, macchiato, mocha
dim_inactive = {
enabled = false,
-- Dim inactive splits/windows/buffers.
-- NOT recommended if you use old palette (a.k.a., mocha).
shade = "dark",
percentage = 0.15,
},
transparent_background = transparent_background,
show_end_of_buffer = false, -- show the '~' characters after the end of buffers
term_colors = true,
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
styles = {
comments = { "italic" },
functions = { "bold" },
keywords = { "italic" },
operators = { "bold" },
conditionals = { "bold" },
loops = { "bold" },
booleans = { "bold", "italic" },
numbers = {},
types = {},
strings = {},
variables = {},
properties = {},
},
integrations = {
treesitter = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
},
aerial = true,
alpha = false,
barbar = false,
beacon = false,
cmp = true,
coc_nvim = false,
dap = true,
dap_ui = true,
dashboard = false,
dropbar = { enabled = true, color_mode = true },
fern = false,
fidget = true,
flash = true,
gitgutter = false,
gitsigns = true,
harpoon = false,
headlines = false,
hop = true,
illuminate = true,
indent_blankline = { enabled = true, colored_indent_levels = false },
leap = false,
lightspeed = false,
lsp_saga = true,
lsp_trouble = true,
markdown = true,
mason = true,
mini = false,
navic = { enabled = false },
neogit = false,
neotest = false,
neotree = { enabled = false, show_root = true, transparent_panel = false },
noice = false,
notify = true,
nvimtree = true,
overseer = false,
pounce = false,
rainbow_delimiters = true,
render_markdown = true,
sandwich = false,
semantic_tokens = true,
symbols_outline = false,
telekasten = false,
telescope = { enabled = true, style = "nvchad" },
treesitter_context = true,
ts_rainbow = false,
vim_sneak = false,
vimwiki = false,
which_key = true,
},
color_overrides = {},
highlight_overrides = {
---@param cp palette
all = function(cp)
return {
-- For base configs
NormalFloat = { fg = cp.text, bg = transparent_background and cp.none or cp.mantle },
FloatBorder = {
fg = transparent_background and cp.blue or cp.mantle,
bg = transparent_background and cp.none or cp.mantle,
},
CursorLineNr = { fg = cp.green },
-- For native lsp configs
DiagnosticVirtualTextError = { bg = cp.none },
DiagnosticVirtualTextWarn = { bg = cp.none },
DiagnosticVirtualTextInfo = { bg = cp.none },
DiagnosticVirtualTextHint = { bg = cp.none },
LspInfoBorder = { link = "FloatBorder" },
-- For mason.nvim
MasonNormal = { link = "NormalFloat" },
-- For indent-blankline
IblIndent = { fg = cp.surface0 },
IblScope = { fg = cp.surface2, style = { "bold" } },
-- For nvim-cmp and wilder.nvim
Pmenu = { fg = cp.overlay2, bg = transparent_background and cp.none or cp.base },
PmenuBorder = { fg = cp.surface1, bg = transparent_background and cp.none or cp.base },
PmenuSel = { bg = cp.green, fg = cp.base },
CmpItemAbbr = { fg = cp.overlay2 },
CmpItemAbbrMatch = { fg = cp.blue, style = { "bold" } },
CmpDoc = { link = "NormalFloat" },
CmpDocBorder = {
fg = transparent_background and cp.surface1 or cp.mantle,
bg = transparent_background and cp.none or cp.mantle,
},
-- For fidget
FidgetTask = { bg = cp.none, fg = cp.surface2 },
FidgetTitle = { fg = cp.blue, style = { "bold" } },
-- For nvim-notify
NotifyBackground = { bg = cp.base },
-- For nvim-tree
NvimTreeRootFolder = { fg = cp.pink },
NvimTreeIndentMarker = { fg = cp.surface2 },
-- For trouble.nvim
TroubleNormal = { bg = transparent_background and cp.none or cp.base },
TroubleNormalNC = { bg = transparent_background and cp.none or cp.base },
-- For telescope.nvim
TelescopeMatching = { fg = cp.lavender },
TelescopeResultsDiffAdd = { fg = cp.green },
TelescopeResultsDiffChange = { fg = cp.yellow },
TelescopeResultsDiffDelete = { fg = cp.red },
-- For glance.nvim
GlanceWinBarFilename = { fg = cp.subtext1, style = { "bold" } },
GlanceWinBarFilepath = { fg = cp.subtext0, style = { "italic" } },
GlanceWinBarTitle = { fg = cp.teal, style = { "bold" } },
GlanceListCount = { fg = cp.lavender },
GlanceListFilepath = { link = "Comment" },
GlanceListFilename = { fg = cp.blue },
GlanceListMatch = { fg = cp.lavender, style = { "bold" } },
GlanceFoldIcon = { fg = cp.green },
-- For nvim-treehopper
TSNodeKey = {
fg = cp.peach,
bg = transparent_background and cp.none or cp.base,
style = { "bold", "underline" },
},
-- For treesitter
["@keyword.return"] = { fg = cp.pink, style = clear },
["@error.c"] = { fg = cp.none, style = clear },
["@error.cpp"] = { fg = cp.none, style = clear },
}
end,
},
})
end