|
| 1 | +local util = require("cyberdream.util") |
| 2 | +local M = {} |
| 3 | + |
| 4 | +--- Get extension configuration |
| 5 | +--- @param opts Config |
| 6 | +--- @param t CyberdreamPalette |
| 7 | +function M.get(opts, t) |
| 8 | + opts = opts or {} |
| 9 | + local highlights = { |
| 10 | + ["@annotation"] = { link = "PreProc" }, |
| 11 | + ["@attribute"] = { link = "PreProc" }, |
| 12 | + ["@boolean"] = { link = "Boolean" }, |
| 13 | + ["@character"] = { link = "Character" }, |
| 14 | + ["@character.special"] = { link = "SpecialChar" }, |
| 15 | + ["@comment"] = { link = "Comment" }, |
| 16 | + ["@conditional"] = { link = "Conditional" }, |
| 17 | + ["@constant"] = { link = "Constant" }, |
| 18 | + ["@constant.builtin"] = { link = "Special" }, |
| 19 | + ["@constant.macro"] = { link = "Define" }, |
| 20 | + ["@constructor"] = { link = "Special" }, |
| 21 | + ["@debug"] = { link = "Debug" }, |
| 22 | + ["@define"] = { link = "Define" }, |
| 23 | + ["@exception"] = { link = "Exception" }, |
| 24 | + ["@field"] = { link = "Identifier" }, |
| 25 | + ["@float"] = { link = "Float" }, |
| 26 | + ["@function"] = { link = "Function" }, |
| 27 | + ["@function.builtin"] = { link = "Special" }, |
| 28 | + ["@function.call"] = { link = "@function" }, |
| 29 | + ["@function.macro"] = { link = "Macro" }, |
| 30 | + ["@include"] = { link = "Include" }, |
| 31 | + ["@keyword"] = { link = "Keyword" }, |
| 32 | + ["@keyword.coroutine"] = { link = "@keyword" }, |
| 33 | + ["@keyword.function"] = { link = "Keyword" }, |
| 34 | + ["@keyword.operator"] = { link = "@operator" }, |
| 35 | + ["@keyword.return"] = { link = "@keyword" }, |
| 36 | + ["@keyword.type"] = { fg = t.orange, italic = true }, |
| 37 | + ["@label"] = { link = "Label" }, |
| 38 | + ["@markup.heading.1"] = { link = "markdownH1" }, |
| 39 | + ["@markup.heading.2"] = { link = "markdownH2" }, |
| 40 | + ["@markup.heading.3"] = { link = "markdownH3" }, |
| 41 | + ["@markup.heading.4"] = { link = "markdownH4" }, |
| 42 | + ["@markup.heading.5"] = { link = "markdownH5" }, |
| 43 | + ["@markup.heading.6"] = { link = "markdownH6" }, |
| 44 | + ["@markup.italic"] = { fg = t.blue, italic = true }, |
| 45 | + ["@markup.link.label"] = { link = "Label" }, |
| 46 | + ["@markup.link.label.markdown_inline"] = { fg = t.cyan }, |
| 47 | + ["@markup.link.markdown_inline"] = { fg = t.blue }, |
| 48 | + ["@markup.link.url"] = { fg = t.blue, underline = true }, |
| 49 | + ["@markup.list.checked"] = { fg = t.green, bold = true }, |
| 50 | + ["@markup.list.unchecked"] = { fg = t.magenta, bold = true }, |
| 51 | + ["@markup.quote"] = { link = "Comment" }, |
| 52 | + ["@markup.strong"] = { fg = t.pink, bold = true }, |
| 53 | + ["@method"] = { link = "Function" }, |
| 54 | + ["@method.call"] = { link = "@method" }, |
| 55 | + ["@namespace"] = { link = "Include" }, |
| 56 | + ["@none"] = { default = true }, |
| 57 | + ["@number"] = { link = "Number" }, |
| 58 | + ["@operator"] = { link = "Operator" }, |
| 59 | + ["@parameter"] = { link = "Identifier" }, |
| 60 | + ["@preproc"] = { link = "PreProc" }, |
| 61 | + ["@property"] = { link = "Identifier" }, |
| 62 | + ["@punctuation.bracket"] = { link = "Delimiter" }, |
| 63 | + ["@punctuation.delimiter"] = { link = "Delimiter" }, |
| 64 | + ["@punctuation.special"] = { link = "Delimiter" }, |
| 65 | + ["@repeat"] = { link = "Repeat" }, |
| 66 | + ["@storageclass"] = { link = "StorageClass" }, |
| 67 | + ["@string"] = { link = "String" }, |
| 68 | + ["@string.escape"] = { link = "SpecialChar" }, |
| 69 | + ["@string.regex"] = { link = "String" }, |
| 70 | + ["@string.special"] = { link = "SpecialChar" }, |
| 71 | + ["@symbol"] = { link = "Identifier" }, |
| 72 | + ["@tag"] = { link = "Label" }, |
| 73 | + ["@tag.attribute"] = { link = "@property" }, |
| 74 | + ["@tag.delimiter"] = { link = "Delimiter" }, |
| 75 | + ["@text"] = { link = "@none" }, |
| 76 | + ["@text.danger"] = { link = "WarningMsg" }, |
| 77 | + ["@text.emphasis"] = { italic = true }, |
| 78 | + ["@text.environment"] = { link = "Macro" }, |
| 79 | + ["@text.environment.name"] = { link = "Type" }, |
| 80 | + ["@text.literal"] = { link = "String" }, |
| 81 | + ["@text.math"] = { link = "Special" }, |
| 82 | + ["@text.note"] = { link = "SpecialComment" }, |
| 83 | + ["@text.reference"] = { link = "Constant" }, |
| 84 | + ["@text.strike"] = { strikethrough = true }, |
| 85 | + ["@text.strong"] = { bold = true, default = true }, |
| 86 | + ["@text.title"] = { link = "markdownH1" }, |
| 87 | + ["@text.title.2"] = { link = "markdownH2" }, |
| 88 | + ["@text.title.3"] = { link = "markdownH3" }, |
| 89 | + ["@text.title.4"] = { link = "markdownH4" }, |
| 90 | + ["@text.title.5"] = { link = "markdownH5" }, |
| 91 | + ["@text.todo"] = { link = "Todo" }, |
| 92 | + ["@text.underline"] = { underline = true }, |
| 93 | + ["@text.uri"] = { link = "Underlined" }, |
| 94 | + ["@text.warning"] = { link = "Todo" }, |
| 95 | + ["@type"] = { link = "Type" }, |
| 96 | + ["@type.builtin"] = { fg = util.blend(t.purple, t.pink, 0.65) }, |
| 97 | + ["@type.definition"] = { link = "Typedef" }, |
| 98 | + ["@type.qualifier"] = { link = "@keyword" }, |
| 99 | + ["@variable"] = { fg = t.fg }, |
| 100 | + ["@variable.builtin"] = { link = "Special" }, |
| 101 | + } |
| 102 | + |
| 103 | + return highlights |
| 104 | +end |
| 105 | +return M |
0 commit comments