summaryrefslogtreecommitdiff
path: root/lua/no-clown-fiesta/markdown.lua
diff options
context:
space:
mode:
authoraktersnurra <gustaf.rydholm@gmail.com>2022-07-29 17:51:29 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-29 17:54:41 +0200
commit4e2317da2b50a30fb64024d7d59f94881e27a609 (patch)
tree5731a5f2c934fe2da5b79aef24f708590af67ae0 /lua/no-clown-fiesta/markdown.lua
parentda502c2571b710791b29c82a77cbe577791b14df (diff)
Update configuration api (#5)
* Refactor * Fix opts * Fix plugin typos * Update readme BREAKING CHANGE: Configuration api updated.
Diffstat (limited to 'lua/no-clown-fiesta/markdown.lua')
-rw-r--r--lua/no-clown-fiesta/markdown.lua56
1 files changed, 30 insertions, 26 deletions
diff --git a/lua/no-clown-fiesta/markdown.lua b/lua/no-clown-fiesta/markdown.lua
index 2b83e05..28ece3b 100644
--- a/lua/no-clown-fiesta/markdown.lua
+++ b/lua/no-clown-fiesta/markdown.lua
@@ -1,27 +1,31 @@
-local markdown = {
- markdownBlockquote = { fg = C.accent },
- markdownBold = { fg = C.yellow, style = "bold" },
- markdownCode = { fg = C.green },
- markdownCodeBlock = { fg = C.green },
- markdownCodeDelimiter = { fg = C.green },
- markdownH1 = { fg = C.blue },
- markdownH2 = { fg = C.blue },
- markdownH3 = { fg = C.blue },
- markdownH4 = { fg = C.blue },
- markdownH5 = { fg = C.blue },
- markdownH6 = { fg = C.blue },
- markdownHeadingDelimiter = { fg = C.red },
- markdownHeadingRule = { fg = C.accent },
- markdownId = { fg = C.purple },
- markdownIdDeclaration = { fg = C.blue },
- markdownIdDelimiter = { fg = C.light_gray },
- markdownLinkDelimiter = { fg = C.light_gray },
- markdownItalic = { style = "italic" },
- markdownLinkText = { fg = C.blue },
- markdownListMarker = { fg = C.red },
- markdownOrderedListMarker = { fg = C.red },
- markdownRule = { fg = C.accent },
- markdownUrl = { fg = C.cyan, style = "underline" },
-}
+local M = {}
-return markdown
+function M.highlight(palette)
+ return {
+ markdownBlockquote = { fg = palette.accent },
+ markdownBold = { fg = palette.yellow, style = "bold" },
+ markdownCode = { fg = palette.green },
+ markdownCodeBlock = { fg = palette.green },
+ markdownCodeDelimiter = { fg = palette.green },
+ markdownH1 = { fg = palette.blue },
+ markdownH2 = { fg = palette.blue },
+ markdownH3 = { fg = palette.blue },
+ markdownH4 = { fg = palette.blue },
+ markdownH5 = { fg = palette.blue },
+ markdownH6 = { fg = palette.blue },
+ markdownHeadingDelimiter = { fg = palette.red },
+ markdownHeadingRule = { fg = palette.accent },
+ markdownId = { fg = palette.purple },
+ markdownIdDeclaration = { fg = palette.blue },
+ markdownIdDelimiter = { fg = palette.light_gray },
+ markdownLinkDelimiter = { fg = palette.light_gray },
+ markdownItalic = { style = "italic" },
+ markdownLinkText = { fg = palette.blue },
+ markdownListMarker = { fg = palette.red },
+ markdownOrderedListMarker = { fg = palette.red },
+ markdownRule = { fg = palette.accent },
+ markdownUrl = { fg = palette.cyan, style = "underline" },
+ }
+end
+
+return M