diff --git a/lua/tokyodark/highlights.lua b/lua/tokyodark/highlights.lua index 7874f58..32b2f41 100644 --- a/lua/tokyodark/highlights.lua +++ b/lua/tokyodark/highlights.lua @@ -13,6 +13,12 @@ local function load_highlights(highlights) end end +local function make_default(table) + for _, v in pairs(table) do + v.default = true + end +end + hl.predef = { Fg = { fg = p.fg }, Grey = { fg = p.grey }, @@ -202,77 +208,82 @@ hl.plugins.treesitter = { if u.check_min_version(0, 8, 0) then hl.plugins.treesitter = { - ["@comment"] = { link = "Comment" }, - ["@error"] = { link = "Error" }, - ["@none"] = { bg = "NONE", fg = "NONE" }, - ["@preproc"] = { link = "PreProc" }, - ["@define"] = { link = "Define" }, - ["@operator"] = { link = "Operator" }, - ["@punctuation.delimiter"] = { link = "Delimiter" }, - ["@punctuation.bracket"] = { link = "Delimiter" }, - ["@punctuation.special"] = { link = "Delimiter" }, - ["@string"] = { link = "String" }, - ["@string.regex"] = { link = "String" }, - ["@string.escape"] = { link = "SpecialChar" }, - ["@string.special"] = { link = "SpecialChar" }, + ["@annotation"] = { link = "PreProc" }, + ["@attribute"] = { link = "PreProc" }, + ["@boolean"] = { link = "Boolean" }, ["@character"] = { link = "Character" }, ["@character.special"] = { link = "SpecialChar" }, - ["@boolean"] = { link = "Boolean" }, - ["@number"] = { link = "Number" }, - ["@float"] = { link = "Float" }, - ["@function"] = { link = "Function" }, - ["@function.call"] = { link = "Function" }, - ["@function.builtin"] = { link = "Special" }, - ["@function.macro"] = { link = "Macro" }, - ["@method"] = { link = "Function" }, - ["@method.call"] = { link = "Function" }, - ["@constructor"] = { link = "Special" }, - ["@parameter"] = { link = "Identifier" }, - ["@keyword"] = { link = "Keyword" }, - ["@keyword.function"] = { link = "Keyword" }, - ["@keyword.operator"] = { link = "Keyword" }, - ["@keyword.return"] = { link = "Keyword" }, + ["@comment"] = { link = "Comment" }, ["@conditional"] = { link = "Conditional" }, - ["@repeat"] = { link = "Repeat" }, - ["@debug"] = { link = "Debug" }, - ["@label"] = { link = "Label" }, - ["@include"] = { link = "Include" }, - ["@exception"] = { link = "Exception" }, - ["@type"] = { link = "Type" }, - ["@type.builtin"] = { link = "Type" }, - ["@type.qualifier"] = { link = "Type" }, - ["@type.definition"] = { link = "Typedef" }, - ["@storageclass"] = { link = "StorageClass" }, - ["@attribute"] = { link = "PreProc" }, - ["@field"] = { link = "Identifier" }, - ["@property"] = { link = "Function" }, - ["@variable"] = { link = "Normal" }, - ["@variable.builtin"] = { link = "Special" }, ["@constant"] = { link = "Constant" }, ["@constant.builtin"] = { link = "Special" }, ["@constant.macro"] = { link = "Define" }, + ["@constructor"] = { link = "Special" }, + ["@debug"] = { link = "Debug" }, + ["@define"] = { link = "Define" }, + ["@defaultLibrary"] = { link = "Special" }, + ["@error"] = { link = "Error" }, + ["@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.function"] = { link = "Keyword" }, + ["@keyword.operator"] = { link = "@operator" }, + ["@keyword.return"] = { link = "@keyword" }, + ["@label"] = { link = "Label" }, + ["@method"] = { link = "Function" }, + ["@method.call"] = { link = "@method" }, ["@namespace"] = { link = "Include" }, + ["@none"] = { bg = "NONE", fg = "NONE" }, + ["@number"] = { link = "Number" }, + ["@operator"] = { link = "Operator" }, + ["@parameter"] = { link = "Identifier" }, + ["@parameter.reference"] = { link = "@parameter" }, + ["@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" }, - ["@text"] = { link = "Normal" }, - ["@text.strong"] = { bold = true }, + ["@tag"] = { link = "Label" }, + ["@tag.attribute"] = { link = "@property" }, + ["@tag.delimiter"] = { link = "Delimiter" }, + ["@text"] = { link = "@none" }, + ["@text.danger"] = { link = "WarningMsg" }, ["@text.emphasis"] = { italic = true }, - ["@text.underline"] = { underline = true }, - ["@text.strike"] = { strikethrough = true }, - ["@text.title"] = { link = "Title" }, - ["@text.literal"] = { link = "String" }, - ["@text.uri"] = { link = "Underlined" }, - ["@text.math"] = { link = "Special" }, ["@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 }, + ["@text.title"] = { link = "Title" }, ["@text.todo"] = { link = "Todo" }, - ["@text.note"] = hl.predef.BlueItalic, - ["@text.warning"] = hl.predef.YellowItalic, - ["@text.danger"] = hl.predef.RedItalic, - ["@tag"] = { link = "Tag" }, - ["@tag.attribute"] = { link = "Identifier" }, - ["@tag.delimiter"] = { link = "Delimiter" }, + ["@text.underline"] = { underline = true }, + ["@text.uri"] = { link = "Underlined" }, + ["@text.warning"] = { link = "Todo" }, + ["@todo"] = { link = "Todo" }, + ["@type"] = { link = "Type" }, + ["@type.builtin"] = { link = "Type" }, + ["@type.definition"] = { link = "Typedef" }, + ["@type.qualifier"] = { link = "Type" }, + ["@variable"] = { link = "Normal" }, + ["@variable.builtin"] = { link = "Special" }, } + make_default(hl.plugins.treesitter) hl.plugins.lsp_semantic_tokens = { LspNamespace = { link = "@namespace" },