From 3949fe8888a203991da5d5eb4e06c3d802e9903e Mon Sep 17 00:00:00 2001 From: tiagovla Date: Mon, 17 Oct 2022 08:25:41 -0300 Subject: [PATCH] fix: update TS + semantic tokens highlights --- lua/tokyodark/highlights.lua | 99 +++++++++++++++++++++++++++++++++++- lua/tokyodark/palette.lua | 3 +- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/lua/tokyodark/highlights.lua b/lua/tokyodark/highlights.lua index 4abd3fd..d231151 100644 --- a/lua/tokyodark/highlights.lua +++ b/lua/tokyodark/highlights.lua @@ -54,7 +54,7 @@ hl.common = { DiffAdd = { fg = p.none, bg = p.diff_add }, DiffChange = { fg = p.none, bg = p.diff_change }, DiffDelete = { fg = p.none, bg = p.diff_delete }, - DiffText = { fg = p.none, reverse = true }, + DiffText = { fg = p.none, bg = p.diff_text }, Directory = { fg = p.green }, ErrorMsg = { fg = p.red, bold = true, underline = true }, WarningMsg = { fg = p.yellow, bold = true }, @@ -198,6 +198,103 @@ hl.plugins.treesitter = { commentTSDanger = hl.predef.RedItalic, commentTSNote = hl.predef.BlueItalic, commentTSWarning = hl.predef.YellowItalic, + ["@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" }, + ["@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" }, + ["@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" }, + ["@namespace"] = { link = "Include" }, + ["@symbol"] = { link = "Identifier" }, + ["@text"] = { link = "Normal" }, + ["@text.strong"] = { bold = true }, + ["@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.reference"] = { link = "Constant" }, + ["@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" }, +} + +hl.plugins.cmp = { + LspNamespace = { link = "@namespace" }, + LspType = { link = "@type" }, + LspClass = { link = "@type" }, + LspEnum = { link = "@constant" }, + LspInterface = { link = "@constant" }, + LspStruct = { link = "@constant" }, + LspTypeParameter = { link = "@type" }, + LspParameter = { link = "@parameter" }, + LspVariable = { link = "@variable" }, + LspProperty = { link = "@property" }, + LspEnumMember = { link = "@constant" }, + LspEvent = { link = "@constant" }, + LspFunction = { link = "@function" }, + LspMethod = { link = "@method" }, + LspMacro = { link = "@constant.macro" }, + LspKeyword = { link = "@keyword" }, + LspModifier = { link = "TSModifier" }, + LspComment = { link = "@comment" }, + LspString = { link = "@string" }, + LspNumber = { link = "@number" }, + LspRegexp = { link = "@string.regex" }, + LspOperator = { link = "@operator" }, + LspDecorator = { link = "@symbol" }, + LspDeprecated = { link = "@text.strike" }, } hl.plugins.cmp = { diff --git a/lua/tokyodark/palette.lua b/lua/tokyodark/palette.lua index 3f80253..b35f7a2 100644 --- a/lua/tokyodark/palette.lua +++ b/lua/tokyodark/palette.lua @@ -14,10 +14,11 @@ local colors = { bg_blue = "#9FBBF3", diff_red = "#773440", diff_green = "#587738", - diff_blue = "#354A77", + diff_blue = "#2a3a5a", diff_add = "#1E2326", diff_change = "#262b3d", diff_delete = "#281B27", + diff_text = "#1c4474", fg = "#A0A8CD", red = "#EE6D85", orange = "#F6955B",