Skip to content

Commit e744b08

Browse files
authored
feat(themes): add support for new treesitter capture groups (#82)
1 parent 3f5ad8b commit e744b08

File tree

1 file changed

+85
-56
lines changed

1 file changed

+85
-56
lines changed

lua/one_monokai/themes/groups.lua

Lines changed: 85 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -84,78 +84,107 @@ local defaults = {
8484
helpSectionDelim = { fg = colors.green },
8585

8686
-- treesitter
87-
["@annotation"] = { link = "PreProc" },
88-
["@attribute"] = { link = "PreProc" },
89-
["@boolean"] = { link = "Boolean" },
90-
["@character"] = { link = "Character" },
91-
["@character.special"] = { link = "SpecialChar" },
92-
["@comment"] = { link = "Comment" },
93-
["@conditional"] = { link = "Conditional" },
87+
["@variable"] = { fg = colors.fg },
88+
["@variable.builtin"] = { fg = colors.pink },
89+
["@variable.member"] = { link = "Identifier" },
90+
["@variable.parameter"] = { fg = colors.orange, italic = config.italics },
91+
["@variable.parameter.builtin"] = { link = "@variable.parameter" },
92+
9493
["@constant"] = { link = "Constant" },
9594
["@constant.builtin"] = { fg = colors.aqua },
9695
["@constant.macro"] = { link = "Define" },
97-
["@constructor"] = { fg = colors.aqua },
98-
["@debug"] = { link = "Debug" },
99-
["@define"] = { link = "Define" },
100-
["@error"] = { link = "Error" },
101-
["@exception"] = { link = "Exception" },
102-
["@field"] = { link = "Identifier" },
103-
["@float"] = { link = "Float" },
96+
97+
["@module"] = { link = "Include" },
98+
["@module.builtin"] = { link = "@module" },
99+
["@label"] = { link = "Label" },
100+
101+
["@string"] = { link = "String" },
102+
["@string.documentation"] = { fg = colors.cyan },
103+
["@string.regexp"] = { link = "String" },
104+
["@string.escape"] = { link = "SpecialChar" },
105+
["@string.special"] = { link = "Special" },
106+
["@string.special.symbol"] = { link = "Identifier" },
107+
["@string.special.url"] = { fg = colors.aqua, undercurl = true },
108+
["@string.special.path"] = { fg = colors.aqua, undercurl = true },
109+
110+
["@character"] = { link = "Character" },
111+
["@character.special"] = { link = "SpecialChar" },
112+
113+
["@boolean"] = { link = "Boolean" },
114+
["@number"] = { link = "Number" },
115+
["@number.float"] = { link = "Float" },
116+
117+
["@type"] = { link = "Type" },
118+
["@type.builtin"] = { link = "Type" },
119+
["@type.definition"] = { link = "Typedef" },
120+
121+
["@attribute"] = { link = "Type" },
122+
["@attribute.bultin"] = { link = "@attribute" },
123+
["@property"] = { link = "Identifier" },
124+
104125
["@function"] = { link = "Function" },
105126
["@function.builtin"] = { link = "Function" },
106127
["@function.call"] = { link = "Function" },
107128
["@function.macro"] = { link = "Macro" },
108-
["@include"] = { link = "Include" },
129+
130+
["@function.method"] = { link = "Function" },
131+
["@function.method.call"] = { link = "Function" },
132+
133+
["@constructor"] = { fg = colors.aqua },
134+
["@operator"] = { link = "Operator" },
135+
109136
["@keyword"] = { link = "Keyword" },
137+
["@keyword.coroutine"] = { link = "Keyword" },
110138
["@keyword.function"] = { fg = colors.pink },
111139
["@keyword.operator"] = { link = "Operator" },
140+
["@keyword.import"] = { link = "Include" },
141+
["@keyword.type"] = { link = "Type" },
142+
["@keyword.modifier"] = { link = "Type" },
143+
["@keyword.repeat"] = { link = "Repeat" },
112144
["@keyword.return"] = { fg = colors.pink },
113-
["@label"] = { link = "Label" },
114-
["@method"] = { link = "Function" },
115-
["@method.call"] = { link = "Function" },
116-
["@namespace"] = { link = "Include" },
117-
["@none"] = {},
118-
["@number"] = { link = "Number" },
119-
["@operator"] = { link = "Operator" },
120-
["@parameter"] = { fg = colors.orange, italic = config.italics },
121-
["@parameter.reference"] = { link = "@parameter" },
122-
["@preproc"] = { link = "PreProc" },
123-
["@property"] = { link = "Identifier" },
124-
["@punctuation.bracket"] = { link = "Delimiter" },
145+
["@keyword.debug"] = { link = "Debug" },
146+
["@keyword.exception"] = { link = "Exception" },
147+
148+
["@keyword.conditional"] = { link = "Conditional" },
149+
["@keyword.conditional.ternary"] = { link = "Conditional" },
150+
151+
["@keyword.directive"] = { link = "PreProc" },
152+
["@keyword.directive.define"] = { link = "@keyword.directive" },
153+
125154
["@punctuation.delimiter"] = { link = "Delimiter" },
155+
["@punctuation.bracket"] = { link = "Delimiter" },
126156
["@punctuation.special"] = { link = "Delimiter" },
127-
["@repeat"] = { link = "Repeat" },
128-
["@storageclass"] = { link = "StorageClass" },
129-
["@string"] = { link = "String" },
130-
["@string.escape"] = { link = "SpecialChar" },
131-
["@string.regex"] = { link = "String" },
132-
["@string.special"] = { link = "SpecialChar" },
133-
["@symbol"] = { link = "Identifier" },
157+
158+
["@comment"] = { link = "Comment" },
159+
["@comment.error"] = { link = "ErrorMsg" },
160+
["@comment.hint"] = { link = "SpecialComment" },
161+
["@comment.todo"] = { link = "Todo" },
162+
["@comment.warning"] = { link = "WarningMsg" },
163+
164+
["@markup.strong"] = { bold = true },
165+
["@markup.italic"] = { italic = true },
166+
["@markup.strikethrough"] = { strikethrough = true },
167+
["@markup.underline"] = { underline = true },
168+
169+
["@markup.heading"] = { link = "Title" },
170+
171+
["@markup.math"] = { link = "Special" },
172+
173+
["@markup.link"] = { link = "Constant" },
174+
["@markup.link.label"] = { link = "SpecialChar" },
175+
["@markup.link.url"] = { fg = colors.aqua, undercurl = true },
176+
177+
["@markup.raw"] = { link = "String" },
178+
179+
["@markup.list"] = { link = "Delimiter" },
180+
["@markup.list.checked"] = { fg = colors.green },
181+
["@markup.list.unchecked"] = { fg = colors.pink },
182+
134183
["@tag"] = { link = "Label" },
135184
["@tag.attribute"] = { link = "Identifier" },
136185
["@tag.delimiter"] = { link = "Delimiter" },
137-
["@text"] = { link = "Normal" },
138-
["@text.danger"] = { link = "WarningMsg" },
139-
["@text.emphasis"] = { italic = config.italics },
140-
["@text.environment"] = { link = "Macro" },
141-
["@text.environment.name"] = { link = "Type" },
142-
["@text.literal"] = { link = "String" },
143-
["@text.math"] = { link = "Special" },
144-
["@text.note"] = { link = "SpecialComment" },
145-
["@text.reference"] = { link = "Constant" },
146-
["@text.strike"] = { strikethrough = true },
147-
["@text.strong"] = { bold = true },
148-
["@text.title"] = { link = "Title" },
149-
["@text.underline"] = { underline = true },
150-
["@text.uri"] = { fg = colors.aqua, undercurl = true },
151-
["@text.warning"] = { link = "WarningMsg" },
152-
["@todo"] = { link = "Todo" },
153-
["@type"] = { link = "Type" },
154-
["@type.builtin"] = { link = "Type" },
155-
["@type.definition"] = { link = "Typedef" },
156-
["@type.qualifier"] = { link = "Type" },
157-
["@variable"] = { fg = colors.fg },
158-
["@variable.builtin"] = { fg = colors.pink },
186+
187+
["@none"] = {},
159188

160189
-- semantic tokens
161190
["@lsp.mod.deprecated"] = { fg = colors.light_gray, strikethrough = true },

0 commit comments

Comments
 (0)