feat: improve markdown syntax (#237)

* types: update highlight type

* feat: improve markdown highlighting
This commit is contained in:
not 2024-02-08 13:42:03 -06:00 committed by GitHub
commit 2ebdcc691b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -362,11 +362,13 @@ local function set_highlights()
["@markup.environment.name"] = { link = "@type" },
-- ["@markup.link"] = {},
["@markup.link.label"] = { fg = palette.text },
["@markup.link.markdown_inline"] = { fg = palette.subtle },
["@markup.link.label.markdown_inline"] = { fg = palette.foam },
["@markup.link.url"] = { fg = groups.link },
-- ["@markup.raw"] = { bg = palette.surface },
-- ["@markup.raw.block"] = { bg = palette.surface },
["@markup.raw.delimiter.markdown"] = { bg = palette.subtle },
["@markup.list"] = { fg = palette.text },
["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
@ -397,6 +399,7 @@ local function set_highlights()
--- Non-highlighting captures
-- ["@none"] = {},
["@conceal"] = { link = "Conceal" },
["@conceal.markdown"] = { fg = palette.subtle },
-- ["@spell"] = {},
-- ["@nospell"] = {},
@ -764,6 +767,7 @@ local function set_highlights()
TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
-- ["@markup.raw"] = { bg = "none" },
["@markup.raw.markdown_inline"] = { fg = palette.gold },
-- ["@markup.raw.block"] = { bg = "none" },
TelescopeNormal = { fg = palette.subtle, bg = "NONE" },

View file

@ -1,7 +1,7 @@
---@alias Variant "main" | "moon" | "dawn"
---@alias Palette { base: string, surface: string, overlay: string, muted: string, subtle: string, text: string, love: string, gold: string, rose: string, pine: string, foam: string, iris: string }
---@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high"
---@alias Highlight { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean }
---@alias Highlight { link: string, inherit: boolean } | { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean }
local config = {}