1
1
return function ()
2
2
local transparent_background = false -- Set background transparency here!
3
+ local clear = {}
3
4
4
5
require (" catppuccin" ).setup ({
5
6
flavour = " mocha" , -- Can be one of: latte, frappe, macchiato, mocha
@@ -119,19 +120,17 @@ return function()
119
120
},
120
121
},
121
122
highlight_overrides = {
123
+ --- @param cp palette
122
124
mocha = function (cp )
123
125
return {
124
- -- For base configs.
126
+ -- For base configs
125
127
NormalFloat = { fg = cp .text , bg = transparent_background and cp .none or cp .base },
128
+ -- FloatBorder = { fg = cp.blue },
126
129
CursorLineNr = { fg = cp .green },
127
130
Search = { bg = cp .surface1 , fg = cp .pink , style = { " bold" } },
128
131
IncSearch = { bg = cp .pink , fg = cp .surface1 },
129
- Keyword = { fg = cp .pink },
130
- Type = { fg = cp .blue },
131
- Typedef = { fg = cp .yellow },
132
- StorageClass = { fg = cp .red , style = { " italic" } },
133
132
134
- -- For native lsp configs.
133
+ -- For native lsp configs
135
134
DiagnosticVirtualTextError = { bg = cp .none },
136
135
DiagnosticVirtualTextWarn = { bg = cp .none },
137
136
DiagnosticVirtualTextInfo = { bg = cp .none },
@@ -143,95 +142,121 @@ return function()
143
142
LspDiagnosticsVirtualTextHint = { fg = cp .rosewater },
144
143
LspDiagnosticsUnderlineHint = { sp = cp .rosewater },
145
144
146
- -- For fidget.
145
+ -- For fidget
147
146
FidgetTask = { bg = cp .none , fg = cp .surface2 },
148
147
FidgetTitle = { fg = cp .blue , style = { " bold" } },
149
148
149
+ -- For nvim-tree
150
+ NvimTreeRootFolder = { fg = cp .pink },
151
+
150
152
-- For trouble.nvim
151
153
TroubleNormal = { bg = cp .base },
152
154
153
155
-- For lsp semantic tokens
154
156
[" @lsp.type.comment" ] = { fg = cp .overlay0 },
155
157
[" @lsp.type.enum" ] = { link = " @type" },
158
+ [" @lsp.type.type" ] = { link = " @type" },
156
159
[" @lsp.type.property" ] = { link = " @property" },
160
+ [" @lsp.type.property.c" ] = { link = " @property.cpp" },
161
+ [" @lsp.type.property.cpp" ] = { link = " @property.cpp" },
157
162
[" @lsp.type.macro" ] = { link = " @constant" },
158
163
[" @lsp.typemod.function.defaultLibrary" ] = { fg = cp .blue , style = { " bold" , " italic" } },
159
164
[" @lsp.typemod.function.defaultLibrary.c" ] = { fg = cp .blue , style = { " bold" } },
160
165
[" @lsp.typemod.function.defaultLibrary.cpp" ] = { fg = cp .blue , style = { " bold" } },
161
166
[" @lsp.typemod.method.defaultLibrary" ] = { link = " @lsp.typemod.function.defaultLibrary" },
162
167
[" @lsp.typemod.variable.defaultLibrary" ] = { fg = cp .flamingo },
163
168
164
- -- For treesitter.
165
- [" @field" ] = { fg = cp .rosewater },
166
- [" @property" ] = { fg = cp .yellow },
169
+ -- For treesitter
170
+ -- Comment = { fg = cp.overlay0 },
171
+ -- Error = { fg = cp.red },
172
+ -- PreProc = { fg = cp.pink },
173
+ -- Operator = { fg = cp.sky },
167
174
168
- [" @include" ] = { fg = cp .teal },
169
- -- ["@operator"] = { fg = cp.sky },
170
- [" @keyword.operator" ] = { fg = cp .sky },
175
+ [" @punctuation.delimiter" ] = { fg = cp .teal },
176
+ [" @punctuation.bracket" ] = { fg = cp .overlay2 },
171
177
[" @punctuation.special" ] = { fg = cp .maroon },
172
178
173
- -- ["@float"] = { fg = cp.peach },
174
- -- ["@number"] = { fg = cp.peach },
175
- -- ["@boolean"] = { fg = cp.peach },
179
+ -- String = { fg = cp.green },
180
+ -- ["@string.regex"] = { fg = cp.peach },
181
+ -- ["@string.escape"] = { fg = cp.pink },
182
+ -- ["@string.special"] = { fg = cp.blue },
183
+
184
+ -- Character = { fg = cp.teal },
185
+ -- SpecialChar = { link = "Special" },
186
+
187
+ -- Boolean = { fg = cp.peach },
188
+ -- Number = { fg = cp.peach },
189
+
190
+ -- Function = { fg = cp.blue },
191
+ -- ["@function.builtin"] = { fg = cp.peach },
192
+ -- ["@function.call"] = { link = "@function" },
193
+ -- ["@function.macro"] = { fg = cp.teal },
194
+ [" @method" ] = { link = " Function" },
195
+ -- ["@method.call"] = { link = "@method" },
176
196
177
197
[" @constructor" ] = { fg = cp .lavender },
178
- -- ["@constant"] = { fg = cp.peach },
179
- -- ["@conditional"] = { fg = cp.mauve },
180
- -- ["@repeat"] = { fg = cp.mauve },
198
+ [" @parameter" ] = { fg = cp .rosewater },
199
+
200
+ Keyword = { fg = cp .red },
201
+ [" @keyword.function" ] = { fg = cp .maroon },
202
+ [" @keyword.operator" ] = { fg = cp .sky },
203
+ [" @keyword.return" ] = { fg = cp .pink , style = clear },
204
+ -- ["@keyword.export"] = { fg = cp.sky },
205
+
206
+ Conditional = { fg = cp .mauve },
207
+ Repeat = { fg = cp .mauve },
208
+ Label = { fg = cp .rosewater },
209
+ [" @include" ] = { fg = cp .teal },
181
210
[" @exception" ] = { fg = cp .peach },
182
211
183
- [ " @constant.builtin " ] = { fg = cp .lavender },
184
- -- ["@function .builtin"] = { fg = cp.peach, style = { "italic" } },
185
- -- ["@type.builtin "] = { fg = cp.yellow, style = { "italic" } },
212
+ -- Type = { fg = cp.yellow },
213
+ -- ["@type .builtin"] = { fg = cp.yellow },
214
+ -- ["@type.definition "] = { link = "@type" },
186
215
[" @type.qualifier" ] = { link = " @keyword" },
187
- [" @variable.builtin" ] = { fg = cp .red , style = { " italic" } },
188
216
189
- -- ["@function"] = { fg = cp.blue },
190
- [" @function.macro" ] = { fg = cp .red , style = {} },
191
- [" @parameter" ] = { fg = cp .rosewater },
192
- [" @keyword" ] = { fg = cp .red , style = { " italic" } },
193
- [" @keyword.function" ] = { fg = cp .maroon },
194
- [" @keyword.return" ] = { fg = cp .pink , style = {} },
217
+ StorageClass = { link = " @keyword" },
218
+ -- Constant = { fg = cp.peach },
219
+ [" @field" ] = { fg = cp .rosewater },
220
+ [" @property" ] = { fg = cp .yellow },
195
221
196
- -- ["@text.note"] = { fg = cp.base, bg = cp.blue },
197
- -- ["@text.warning"] = { fg = cp.base, bg = cp.yellow },
198
- -- ["@text.danger"] = { fg = cp.base, bg = cp.red },
199
- -- ["@constant.macro"] = { fg = cp.mauve },
222
+ -- ["@variable"] = { fg = cp.text },
223
+ [" @variable.builtin" ] = { fg = cp .flamingo , style = { " italic" } },
200
224
201
- -- ["@label "] = { fg = cp.blue },
202
- [" @method " ] = { fg = cp .blue , style = { " italic " } },
203
- [ " @namespace " ] = { fg = cp .rosewater , style = {} },
225
+ [" @constant " ] = { link = " Constant " },
226
+ [" @constant.builtin " ] = { fg = cp .lavender },
227
+ Macro = { fg = cp .mauve },
204
228
205
- [" @punctuation.delimiter" ] = { fg = cp .teal },
206
- [" @punctuation.bracket" ] = { fg = cp .overlay2 },
207
- -- ["@string"] = { fg = cp.green },
208
- -- ["@string.regex"] = { fg = cp.peach },
209
- [" @type" ] = { fg = cp .yellow },
210
- [" @variable" ] = { fg = cp .text },
211
- [" @tag.attribute" ] = { fg = cp .mauve , style = { " italic" } },
229
+ [" @namespace" ] = { fg = cp .rosewater , style = clear },
230
+ -- ["@symbol"] = { fg = cp.flamingo },
231
+
232
+ [" @text" ] = { fg = cp .text },
212
233
[" @tag" ] = { fg = cp .peach },
234
+ [" @tag.attribute" ] = { fg = cp .mauve },
213
235
[" @tag.delimiter" ] = { fg = cp .maroon },
214
- [" @text" ] = { fg = cp .text },
215
236
216
- -- ["@text.uri"] = { fg = cp.rosewater, style = { "italic", "underline" } },
217
- -- ["@text.literal"] = { fg = cp.teal, style = { "italic" } },
218
- -- ["@text.reference"] = { fg = cp.lavender, style = { "bold" } },
219
- -- ["@text.title"] = { fg = cp.blue, style = { "bold" } },
220
- -- ["@text.emphasis"] = { fg = cp.maroon, style = { "italic" } },
221
- -- ["@text.strong"] = { fg = cp.maroon, style = { "bold" } },
222
- -- ["@string.escape"] = { fg = cp.pink },
237
+ -- TODO: support semantic tokens
238
+
239
+ -- ["@class"] = { fg = cp.blue },
240
+ -- ["@struct"] = { fg = cp.blue },
241
+ [" @enum" ] = { link = " @type" },
242
+ -- ["@enumMember"] = { fg = cp.flamingo },
243
+ -- ["@event"] = { fg = cp.flamingo },
244
+ [" @interface" ] = { fg = cp .yellow },
245
+ -- ["@modifier"] = { fg = cp.flamingo },
246
+ -- ["@regexp"] = { fg = cp.pink },
247
+ -- ["@typeParameter"] = { fg = cp.yellow },
248
+ -- ["@decorator"] = { fg = cp.flamingo },
223
249
224
250
-- ["@property.toml"] = { fg = cp.blue },
225
251
-- ["@field.yaml"] = { fg = cp.blue },
226
252
227
253
-- ["@label.json"] = { fg = cp.blue },
228
254
229
255
[" @function.builtin.bash" ] = { fg = cp .red , style = { " italic" } },
230
- [" @parameter.bash" ] = { fg = cp .yellow , style = { " italic" } },
256
+ -- ["@parameter.bash"] = { fg = cp.yellow, style = { "italic" } },
231
257
232
- [" @field.lua" ] = { fg = cp .lavender },
233
258
[" @constructor.lua" ] = { fg = cp .flamingo },
234
- [" @variable.builtin. lua" ] = { fg = cp .flamingo , style = { " italic " } },
259
+ [" @field. lua" ] = { fg = cp .lavender },
235
260
236
261
[" @constant.java" ] = { fg = cp .teal },
237
262
@@ -244,12 +269,15 @@ return function()
244
269
[" @type.css" ] = { fg = cp .lavender },
245
270
[" @property.css" ] = { fg = cp .yellow , style = { " italic" } },
246
271
247
- [" @type.builtin.c" ] = { fg = cp . yellow , style = {} },
272
+ [" @type.builtin.c" ] = { style = clear },
248
273
249
274
[" @property.cpp" ] = { fg = cp .text },
250
- [" @type.builtin.cpp" ] = { fg = cp . yellow , style = {} },
275
+ [" @type.builtin.cpp" ] = { style = clear },
251
276
252
277
-- ["@symbol"] = { fg = cp.flamingo },
278
+
279
+ -- Misc
280
+ gitcommitSummary = { fg = cp .rosewater , style = { " italic" } },
253
281
}
254
282
end ,
255
283
},
0 commit comments