From b7df2e60e03d31811460a1aa8b8a537daf9de6a7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Oct 2023 08:35:47 +0200 Subject: [PATCH] feat: added support for headlines.nvim --- lua/tokyonight/theme.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lua/tokyonight/theme.lua b/lua/tokyonight/theme.lua index c01d4e1..e0b3916 100644 --- a/lua/tokyonight/theme.lua +++ b/lua/tokyonight/theme.lua @@ -312,14 +312,6 @@ function M.setup() -- NOTE: maybe add these with distinct highlights? -- ["@lsp.typemod.variable.globalScope"] (global variables) - -- Markdown - ["@text.title.1.markdown"] = { fg = c.blue, bold = true }, - ["@text.title.2.markdown"] = { fg = c.yellow, bold = true }, - ["@text.title.3.markdown"] = { fg = c.green, bold = true }, - ["@text.title.4.markdown"] = { fg = c.teal, bold = true }, - ["@text.title.5.markdown"] = { fg = c.magenta, bold = true }, - ["@text.title.6.markdown"] = { fg = c.purple, bold = true }, - -- ts-rainbow rainbowcol1 = { fg = c.red }, rainbowcol2 = { fg = c.yellow }, @@ -628,6 +620,10 @@ function M.setup() CmpItemKindOperator = { fg = c.green1, bg = c.none }, CmpItemKindSnippet = { fg = c.dark5, bg = c.none }, + -- headlines.nvim + CodeBlock = { bg = c.bg_dark }, + Headline = { bg = c.bg_dark }, + -- navic NavicIconsFile = { fg = c.fg, bg = c.none }, NavicIconsModule = { fg = c.yellow, bg = c.none }, @@ -838,6 +834,13 @@ function M.setup() -- TreesitterContext = { bg = util.darken(c.bg_visual, 0.4) }, } + local markdown_rainbow = { c.blue, c.yellow, c.green, c.teal, c.magenta, c.purple } + + for i, color in ipairs(markdown_rainbow) do + theme.highlights["@text.title." .. i .. ".markdown"] = { fg = color, bold = true } + theme.highlights["Headline" .. i] = { bg = util.darken(color, 0.1) } + end + if not vim.diagnostic then local severity_map = { Error = "Error",