-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
treesitter.lua
105 lines (103 loc) · 4.83 KB
/
treesitter.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
local util = require("cyberdream.util")
local M = {}
--- Get extension configuration
--- @param opts Config
--- @param t CyberdreamPalette
function M.get(opts, t)
opts = opts or {}
local highlights = {
["@annotation"] = { link = "PreProc" },
["@attribute"] = { link = "PreProc" },
["@boolean"] = { link = "Boolean" },
["@character"] = { link = "Character" },
["@character.special"] = { link = "SpecialChar" },
["@comment"] = { link = "Comment" },
["@conditional"] = { link = "Conditional" },
["@constant"] = { link = "Constant" },
["@constant.builtin"] = { link = "Special" },
["@constant.macro"] = { link = "Define" },
["@constructor"] = { link = "Special" },
["@debug"] = { link = "Debug" },
["@define"] = { link = "Define" },
["@exception"] = { link = "Exception" },
["@field"] = { link = "Identifier" },
["@float"] = { link = "Float" },
["@function"] = { link = "Function" },
["@function.builtin"] = { link = "Special" },
["@function.call"] = { link = "@function" },
["@function.macro"] = { link = "Macro" },
["@include"] = { link = "Include" },
["@keyword"] = { link = "Keyword" },
["@keyword.coroutine"] = { link = "@keyword" },
["@keyword.function"] = { link = "Keyword" },
["@keyword.operator"] = { link = "@operator" },
["@keyword.return"] = { link = "@keyword" },
["@keyword.type"] = { fg = t.orange, italic = true },
["@label"] = { link = "Label" },
["@markup.heading.1"] = { link = "markdownH1" },
["@markup.heading.2"] = { link = "markdownH2" },
["@markup.heading.3"] = { link = "markdownH3" },
["@markup.heading.4"] = { link = "markdownH4" },
["@markup.heading.5"] = { link = "markdownH5" },
["@markup.heading.6"] = { link = "markdownH6" },
["@markup.italic"] = { fg = t.blue, italic = true },
["@markup.link.label"] = { link = "Label" },
["@markup.link.label.markdown_inline"] = { fg = t.cyan },
["@markup.link.markdown_inline"] = { fg = t.blue },
["@markup.link.url"] = { fg = t.blue, underline = true },
["@markup.list.checked"] = { fg = t.green, bold = true },
["@markup.list.unchecked"] = { fg = t.magenta, bold = true },
["@markup.quote"] = { link = "Comment" },
["@markup.strong"] = { fg = t.pink, bold = true },
["@method"] = { link = "Function" },
["@method.call"] = { link = "@method" },
["@namespace"] = { link = "Include" },
["@none"] = { default = true },
["@number"] = { link = "Number" },
["@operator"] = { link = "Operator" },
["@parameter"] = { link = "Identifier" },
["@preproc"] = { link = "PreProc" },
["@property"] = { link = "Identifier" },
["@punctuation.bracket"] = { link = "Delimiter" },
["@punctuation.delimiter"] = { link = "Delimiter" },
["@punctuation.special"] = { link = "Delimiter" },
["@repeat"] = { link = "Repeat" },
["@storageclass"] = { link = "StorageClass" },
["@string"] = { link = "String" },
["@string.escape"] = { link = "SpecialChar" },
["@string.regex"] = { link = "String" },
["@string.special"] = { link = "SpecialChar" },
["@symbol"] = { link = "Identifier" },
["@tag"] = { link = "Label" },
["@tag.attribute"] = { link = "@property" },
["@tag.delimiter"] = { link = "Delimiter" },
["@text"] = { link = "@none" },
["@text.danger"] = { link = "WarningMsg" },
["@text.emphasis"] = { italic = true },
["@text.environment"] = { link = "Macro" },
["@text.environment.name"] = { link = "Type" },
["@text.literal"] = { link = "String" },
["@text.math"] = { link = "Special" },
["@text.note"] = { link = "SpecialComment" },
["@text.reference"] = { link = "Constant" },
["@text.strike"] = { strikethrough = true },
["@text.strong"] = { bold = true, default = true },
["@text.title"] = { link = "markdownH1" },
["@text.title.2"] = { link = "markdownH2" },
["@text.title.3"] = { link = "markdownH3" },
["@text.title.4"] = { link = "markdownH4" },
["@text.title.5"] = { link = "markdownH5" },
["@text.todo"] = { link = "Todo" },
["@text.underline"] = { underline = true },
["@text.uri"] = { link = "Underlined" },
["@text.warning"] = { link = "Todo" },
["@type"] = { link = "Type" },
["@type.builtin"] = { fg = util.blend(t.purple, t.pink, 0.65) },
["@type.definition"] = { link = "Typedef" },
["@type.qualifier"] = { link = "@keyword" },
["@variable"] = { fg = t.fg },
["@variable.builtin"] = { link = "Special" },
}
return highlights
end
return M