From 40850f75074766a6e71a979c174b0022b6219d86 Mon Sep 17 00:00:00 2001 From: tinusgraglin Date: Mon, 29 Jan 2024 19:17:41 +0800 Subject: [PATCH] feat: make markdown headings distinguishable with treesitter --- lua/onenord/theme.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/onenord/theme.lua b/lua/onenord/theme.lua index 6f3e7a3..0f23e0a 100644 --- a/lua/onenord/theme.lua +++ b/lua/onenord/theme.lua @@ -454,6 +454,20 @@ function theme.highlights(colors, config) -- Variable names defined by the language: `this` or `self` in Javascript. ["@variable.builtin"] = { fg = colors.red, style = config.styles.variables }, + -- Specific to Markdown: different levels of headings + ["@markup.heading.1.markdown"] = { link = "markdownH1" }, + ["@markup.heading.2.markdown"] = { link = "markdownH2" }, + ["@markup.heading.3.markdown"] = { link = "markdownH3" }, + ["@markup.heading.4.markdown"] = { link = "markdownH4" }, + ["@markup.heading.5.markdown"] = { link = "markdownH5" }, + ["@markup.heading.6.markdown"] = { link = "markdownH6" }, + ["@markup.heading.1.marker.markdown"] = { link = "markdownH1Delimiter" }, + ["@markup.heading.2.marker.markdown"] = { link = "markdownH2Delimiter" }, + ["@markup.heading.3.marker.markdown"] = { link = "markdownH3Delimiter" }, + ["@markup.heading.4.marker.markdown"] = { link = "markdownH4Delimiter" }, + ["@markup.heading.5.marker.markdown"] = { link = "markdownH5Delimiter" }, + ["@markup.heading.6.marker.markdown"] = { link = "markdownH6Delimiter" }, + -- Legacy highlights ["@conditional"] = { link = "@keyword.conditional" }, ["@exception"] = { link = "@keyword.exception" },