@@ -15,12 +15,16 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
15
15
local colors = { -- Reference: https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md
16
16
17
17
-- Misc
18
- [" @comment" ] = { link = " Comment" },
19
18
[" @error" ] = { link = " Error" },
20
- [" @preproc" ] = { link = " PreProc" }, -- various preprocessor directives & shebangs
21
19
[" @define" ] = { link = " Define" }, -- preprocessor definition directives
22
20
[" @operator" ] = { link = " Operator" }, -- For any operator: +, but also -> and * in C.
23
21
22
+ -- Comment
23
+ [" @comment" ] = { link = " Comment" },
24
+ [" comment.note" ] = { fg = C .base , bg = C .blue },
25
+ [" comment.warning" ] = { fg = C .base , bg = C .yellow },
26
+ [" comment.error" ] = { fg = C .base , bg = C .red },
27
+
24
28
-- Punctuation
25
29
[" @punctuation.delimiter" ] = { link = " Delimiter" }, -- For delimiters (e.g. `;` / `.` / `,`).
26
30
[" @punctuation.bracket" ] = { fg = C .overlay2 }, -- For brackets and parenthesis.
@@ -32,6 +36,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
32
36
[" @string.escape" ] = { fg = C .pink , style = O .styles .strings or {} }, -- For escape characters within a string.
33
37
[" @string.special" ] = { link = " Special" }, -- other special strings (e.g. dates)
34
38
[" @string.special.symbol" ] = { fg = C .flamingo },
39
+ [" @string.special.url" ] = { fg = C .rosewater , style = { " italic" , " underline" } }, -- urls, links and emails
35
40
36
41
[" @character" ] = { link = " Character" }, -- character literals
37
42
[" @character.special" ] = { link = " SpecialChar" }, -- special characters (e.g. wildcards)
@@ -46,8 +51,8 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
46
51
[" @function.builtin" ] = { fg = C .peach , style = O .styles .functions or {} }, -- For builtin functions: table.insert in Lua.
47
52
[" @function.call" ] = { link = " Function" }, -- function calls
48
53
[" @function.macro" ] = { fg = C .teal , style = O .styles .functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in Rust.
49
- [" @method" ] = { link = " Function" }, -- For method definitions.
50
- [" @method.call" ] = { link = " Function" }, -- For method calls.
54
+ [" @function. method" ] = { link = " Function" }, -- For method definitions.
55
+ [" @function. method.call" ] = { link = " Function" }, -- For method calls.
51
56
52
57
[" @constructor" ] = { fg = C .sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
53
58
@@ -56,6 +61,8 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
56
61
[" @keyword.function" ] = { fg = C .mauve , style = O .styles .keywords or {} }, -- For keywords used to define a function.
57
62
[" @keyword.operator" ] = { fg = C .mauve , style = O .styles .operators or {} }, -- For new keyword operator
58
63
[" @keyword.return" ] = { fg = C .mauve , style = O .styles .keywords or {} },
64
+ [" @keyword.storage" ] = { link = " StorageClass" }, -- visibility/life-time/etc. modifiers (e.g. `static`)
65
+ [" @keyword.directive" ] = { link = " PreProc" }, -- various preprocessor directives & shebangs
59
66
-- JS & derivative
60
67
[" @keyword.export" ] = { fg = C .sky , style = O .styles .keywords },
61
68
@@ -72,16 +79,15 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
72
79
[" @type.definition" ] = { link = " Type" }, -- type definitions (e.g. `typedef` in C)
73
80
[" @type.qualifier" ] = { link = " Keyword" }, -- type qualifiers (e.g. `const`)
74
81
75
- [" @storageclass" ] = { link = " StorageClass" }, -- visibility/life-time/etc. modifiers (e.g. `static`)
76
82
[" @attribute" ] = { link = " Constant" }, -- attribute annotations (e.g. Python decorators)
77
- [" @field" ] = { fg = C .lavender }, -- For fields.
78
83
[" @property" ] = { fg = C .lavender , style = O .styles .properties or {} }, -- Same as TSField.
79
84
80
85
-- Identifiers
81
86
82
87
[" @variable" ] = { fg = C .text , style = O .styles .variables or {} }, -- Any variable name that does not have another highlight.
83
88
[" @variable.builtin" ] = { fg = C .red , style = O .styles .properties or {} }, -- Variable names that are defined by the languages, like this or self.
84
89
[" @variable.parameter" ] = { fg = C .maroon , style = O .styles .variables or {} }, -- For parameters of a function.
90
+ [" @variable.member" ] = { fg = C .lavender }, -- For fields.
85
91
86
92
[" @constant" ] = { link = " Constant" }, -- For constants
87
93
[" @constant.builtin" ] = { fg = C .peach , style = O .styles .keywords or {} }, -- For constant that are built in the language: nil in Lua.
@@ -95,23 +101,22 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
95
101
[" @markup.emphasis" ] = { fg = C .maroon , style = { " italic" } }, -- italic
96
102
[" @markup.underline" ] = { link = " Underline" }, -- underlined text
97
103
[" @markup.strike" ] = { fg = C .text , style = { " strikethrough" } }, -- strikethrough text
98
- [" @markup.headline " ] = { fg = C .blue , style = { " bold" } }, -- titles like: # Example
104
+ [" @markup.heading " ] = { fg = C .blue , style = { " bold" } }, -- titles like: # Example
99
105
[" @markup.raw" ] = { fg = C .teal }, -- used for inline code in markdown and for doc in python (""")
100
- [" @markup.link.uri " ] = { fg = C .rosewater , style = { " italic" , " underline" } }, -- urls, links and emails
106
+ [" @markup.link.url " ] = { fg = C .rosewater , style = { " italic" , " underline" } }, -- urls, links and emails
101
107
[" @markup.math" ] = { fg = C .blue }, -- math environments (e.g. `$ ... $` in LaTeX)
102
108
[" @markup.environment" ] = { fg = C .pink }, -- text environments of markup languages
103
109
[" @markup.environment.name" ] = { fg = C .blue }, -- text indicating the type of an environment
104
110
[" @markup.reference" ] = { link = " Tag" }, -- text references, footnotes, citations, etc.
105
111
106
- [" @markup.todo" ] = { fg = C .base , bg = C .yellow }, -- todo notes
107
- [" @markup.todo.checked" ] = { fg = C .green }, -- todo notes
108
- [" @markup.todo.unchecked" ] = { fg = C .overlay1 }, -- todo notes
109
- [" @markup.note" ] = { fg = C .base , bg = C .blue },
110
- [" @markup.warning" ] = { fg = C .base , bg = C .yellow },
111
- [" @markup.danger" ] = { fg = C .base , bg = C .red },
112
+ [" @markup.list" ] = { link = " Special" },
113
+ [" @markup.list.checked" ] = { fg = C .green }, -- todo notes
114
+ [" @markup.list.unchecked" ] = { fg = C .overlay1 }, -- todo notes
112
115
113
- [" @markup.diff.add" ] = { link = " diffAdded" }, -- added text (for diff files)
114
- [" @markup.diff.delete" ] = { link = " diffRemoved" }, -- deleted text (for diff files)
116
+ -- Diff
117
+ [" @diff.plus" ] = { link = " diffAdded" }, -- added text (for diff files)
118
+ [" @diff.minus" ] = { link = " diffRemoved" }, -- deleted text (for diff files)
119
+ [" @diff.delta" ] = { link = " diffChanged" }, -- deleted text (for diff files)
115
120
116
121
-- Tags
117
122
[" @tag" ] = { fg = C .mauve }, -- Tags like html tag names.
@@ -123,12 +128,12 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
123
128
[" @function.builtin.bash" ] = { fg = C .red , style = { " italic" } },
124
129
125
130
-- markdown
126
- [" @text.title.2 .markdown" ] = { link = " rainbow2 " },
127
- [" @text.title.1 .markdown" ] = { link = " rainbow1 " },
128
- [" @text.title .3.markdown" ] = { link = " rainbow3" },
129
- [" @text.title .4.markdown" ] = { link = " rainbow4" },
130
- [" @text.title .5.markdown" ] = { link = " rainbow5" },
131
- [" @text.title .6.markdown" ] = { link = " rainbow6" },
131
+ [" @markup.heading.1 .markdown" ] = { link = " rainbow1 " },
132
+ [" @markup.heading.2 .markdown" ] = { link = " rainbow2 " },
133
+ [" @markup.heading .3.markdown" ] = { link = " rainbow3" },
134
+ [" @markup.heading .4.markdown" ] = { link = " rainbow4" },
135
+ [" @markup.heading .5.markdown" ] = { link = " rainbow5" },
136
+ [" @markup.heading .6.markdown" ] = { link = " rainbow6" },
132
137
133
138
-- java
134
139
[" @constant.java" ] = { fg = C .teal },
@@ -160,14 +165,14 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
160
165
[" @tag.attribute.tsx" ] = { fg = C .mauve , style = { " italic" } },
161
166
162
167
-- yaml
163
- [" @field .yaml" ] = { fg = C .blue }, -- For fields.
168
+ [" @variable.member .yaml" ] = { fg = C .blue }, -- For fields.
164
169
165
170
-- Ruby
166
171
[" @string.special.symbol.ruby" ] = { fg = C .flamingo },
167
172
168
173
-- PHP
169
- [" @method.php" ] = { link = " Function" },
170
- [" @method.call.php" ] = { link = " Function" },
174
+ [" @function. method.php" ] = { link = " Function" },
175
+ [" @function. method.call.php" ] = { link = " Function" },
171
176
172
177
-- C/CPP
173
178
[" @type.builtin.c" ] = { fg = C .yellow , style = {} },
@@ -181,6 +186,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
181
186
182
187
-- Legacy highlights
183
188
colors [" @parameter" ] = colors [" @variable.parameter" ]
189
+ colors [" @field" ] = colors [" @variable.member" ]
184
190
colors [" @namespace" ] = colors [" @module" ]
185
191
colors [" @float" ] = colors [" number.float" ]
186
192
colors [" @symbol" ] = colors [" @string.special.symbol" ]
@@ -191,26 +197,52 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci
191
197
colors [" @text.emphasis" ] = colors [" @markup.emphasis" ]
192
198
colors [" @text.underline" ] = colors [" @markup.underline" ]
193
199
colors [" @text.strike" ] = colors [" @markup.strike" ]
194
- colors [" @text.title" ] = colors [" @markup.headline" ]
195
- colors [" @text.literal" ] = colors [" @markup.raw" ]
196
- colors [" @text.uri" ] = colors [" @markup.link.uri" ]
200
+ colors [" @text.uri" ] = colors [" @markup.link.url" ]
197
201
colors [" @text.math" ] = colors [" @markup.math" ]
198
202
colors [" @text.environment" ] = colors [" @markup.environment" ]
199
203
colors [" @text.environment.name" ] = colors [" @markup.environment.name" ]
204
+
205
+ colors [" @text.title" ] = colors [" @markup.heading" ]
206
+ colors [" @text.literal" ] = colors [" @markup.raw" ]
200
207
colors [" @text.reference" ] = colors [" @markup.reference" ]
201
208
202
- colors [" @text.todo" ] = colors [" @markup.todo" ]
203
- colors [" @text.todo.checked" ] = colors [" @markup.todo.checked" ]
204
- colors [" @text.todo.unchecked" ] = colors [" @markup.todo.unchecked" ]
205
- colors [" @text.note" ] = colors [" @markup.note" ]
206
- colors [" @text.warning" ] = colors [" @markup.warning" ]
207
- colors [" @text.danger" ] = colors [" @markup.danger" ]
209
+ colors [" @text.todo.checked" ] = colors [" @markup.list.checked" ]
210
+ colors [" @text.todo.unchecked" ] = colors [" @markup.list.unchecked" ]
211
+
212
+ -- @text.todo is now for todo comments, not todo notes like in markdown
213
+ colors [" @text.todo" ] = colors [" comment.warning" ]
214
+ colors [" @text.warning" ] = colors [" comment.warning" ]
215
+ colors [" @text.note" ] = colors [" comment.note" ]
216
+ colors [" @text.danger" ] = colors [" comment.error" ]
208
217
209
- colors [" @text.diff.add" ] = colors [" @markup.diff.add" ]
210
- colors [" @text.diff.delete" ] = colors [" @markup.diff.delete" ]
218
+ -- @text.uri is now
219
+ -- @markup.link.url in markup links
220
+ -- @string.special.url outside of markup
221
+ colors [" text.uri" ] = colors [" @markup.link.uri" ]
222
+
223
+ colors [" @method" ] = colors [" @function.method" ]
224
+ colors [" @method.call" ] = colors [" @function.method.call" ]
225
+
226
+ colors [" @text.diff.add" ] = colors [" @diff.plus" ]
227
+ colors [" @text.diff.delete" ] = colors [" @diff.minus" ]
228
+
229
+ colors [" @preproc" ] = colors [" @keyword.directive" ]
230
+ colors [" @storageclass" ] = colors [" @keyword.storage" ]
211
231
212
232
colors [" @symbol.ruby" ] = colors [" @string.special.symbol.ruby" ]
213
233
234
+ colors [" @variable.member.yaml" ] = colors [" @field.yaml" ]
235
+
236
+ colors [" @text.title.1.markdown" ] = colors [" @markup.heading.1.markdown" ]
237
+ colors [" @text.title.2.markdown" ] = colors [" @markup.heading.2.markdown" ]
238
+ colors [" @text.title.3.markdown" ] = colors [" @markup.heading.3.markdown" ]
239
+ colors [" @text.title.4.markdown" ] = colors [" @markup.heading.4.markdown" ]
240
+ colors [" @text.title.5.markdown" ] = colors [" @markup.heading.5.markdown" ]
241
+ colors [" @text.title.6.markdown" ] = colors [" @markup.heading.6.markdown" ]
242
+
243
+ colors [" @method.php" ] = colors [" @function.method.php" ]
244
+ colors [" @method.call.php" ] = colors [" @function.method.call.php" ]
245
+
214
246
return colors
215
247
end
216
248
0 commit comments