Skip to content

Commit

Permalink
chore: #222 add markup highlights to treesitter file
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Jan 21, 2024
1 parent 98a2086 commit 5d0f52b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lua/onedarkpro/highlights/filetypes/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,11 @@ function M.groups(theme)
["@text.literal.markdown_inline"] = { fg = theme.palette.green },
["@text.reference.markdown_inline"] = { fg = theme.palette.blue },
["@text.strong.markdown_inline"] = { fg = theme.palette.orange, bold = true },
["@markup.strong.markdown_inline"] = { link = "@text.strong.markdown_inline" },
["@text.title.markdown"] = { fg = theme.palette.red, bold = true },

["@markup.heading.1.markdown"] = { link = "@text.title.1.markdown" },
["@markup.heading.1.marker.markdown"] = { link = "@text.title.1.marker.markdown" },
["@markup.heading.2.markdown"] = { link = "@text.title.2.markdown" },
["@markup.heading.2.marker.markdown"] = { link = "@text.title.2.marker.markdown" },
["@markup.heading.3.markdown"] = { link = "@text.title.3.markdown" },
["@markup.heading.3.marker.markdown"] = { link = "@text.title.3.marker.markdown" },
["@markup.heading.4.markdown"] = { link = "@text.title.4.markdown" },
["@markup.heading.4.marker.markdown"] = { link = "@text.title.4.marker.markdown" },

["@parameter.markdown_inline"] = { fg = theme.palette.fg },
["@punctuation.special.markdown"] = { fg = theme.palette.red },
["@punctuation.delimiter.markdown_inline"] = { fg = theme.palette.orange },
["@markup.list.markdown"] = { link = "@punctuation.special.markdown" },
["@markup.list.checked.markdown"] = { fg = theme.palette.bg, bg = theme.palette.purple },

["@markup.raw.markdown_inline"] = { fg = theme.palette.green },

["@text.uri.markdown_inline"] = { fg = theme.palette.purple },
["@markup.link.url.markdown_inline"] = { link = "@text.uri.markdown_inline" },
["@markup.link.label.markdown_inline"] = { link = "@text.reference.markdown_inline" },
}
end

Expand Down
18 changes: 18 additions & 0 deletions lua/onedarkpro/highlights/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ function M.groups(theme)

--["@text.diff.add"] -- added text (for diff files)
--["@text.diff.delete"] -- deleted text (for diff files)
-- Markup
["@markup.strong"] = { fg = theme.palette.yellow, bold = true }, -- bold text
["@markup.italic"] = { italic = true }, -- italic text
["@markup.strikethrough"] = { strikethrough = true }, -- struck-through text
["@markup.underline"] = { underline = true }, -- underlined text (only for literal underline markup!)

["@markup.heading"] = { link = "Title" }, -- headings, titles (including markers)

["@markup.math"] = { link = "Special" }, -- math environments (e.g. `$ ... $` in LaTeX)

["@markup.link.label"] = { fg = theme.palette.purple }, -- link, reference descriptions
["@markup.link.url"] = { fg = theme.palette.blue }, -- URL-style links

["@markup.raw"] = { fg = theme.palette.green }, -- literal or verbatim text (e.g. inline code)

["@markup.list"] = { fg = theme.palette.red }, -- list markers
["@markup.list.checked"] = { bg = theme.palette.purple, fg = theme.palette.bg }, -- checked todo-style list markers
["@markup.list.unchecked"] = { fg = theme.palette.fg }, -- unchecked todo-style list markers

-- Tags
["@tag"] = { fg = theme.palette.red }, -- XML tag names
Expand Down

0 comments on commit 5d0f52b

Please sign in to comment.