HoNamDuong / hybrid.nvim

A dark Neovim theme written in Lua
MIT License
88 stars 8 forks source link

Markdown highlights #4

Closed bleacheda closed 4 months ago

bleacheda commented 4 months ago

Hello,

To start off, thanks for the theme, absolutely love it.

A few ideas/suggestions for markdown highlights:

  1. make bold text also a different color than normal text
  2. make unordered lists markers: dashes (-), asterisks (*), or plus signs (+) a different color than normal text
  3. make ordered lists markers (1. 2. 3. etc.) a different color than normal text
  4. make angle brackets links a different color than normal text

comparison for reference (hybrid left - nightfox right)

image

HoNamDuong commented 4 months ago

Thank you, I will add them in the next commit.

bleacheda commented 4 months ago

Thanks! I hope it is ok if I add other possible suggestions related to Markdown here

comparison for reference (hybrid left - tokyonight right)

image

bleacheda commented 4 months ago

I've just updated with the latest commit, awesome that you added so many options so fast.

Could you please provide examples on how to override all the markdown highlights options? I tried to follow the example in the README but didn't manage to adapt it for markdown.

HoNamDuong commented 4 months ago

Could you please provide examples on how to override all the markdown highlights options? I tried to follow the example in the README but didn't manage to adapt it for markdown.

Example:

require("hybrid").setup({
    overrides = function(hl, c)
        hl["@markup.strong"] = { bold = true }
        hl["@markup.italic"] = { italic = true }
        hl["@markup.strikethrough"] = { strikethrough = true }
        hl["@markup.underline"] = { underline = true }
        hl["@markup.heading"] = { link = "Title", bold = true }
        hl["@markup.heading.1"] = { fg = c.bright_yellow, bold = true }
        hl["@markup.heading.2"] = { fg = c.bright_green, bold = true }
        hl["@markup.heading.3"] = { fg = c.bright_cyan, bold = true }
        hl["@markup.heading.4"] = { fg = c.yellow }
        hl["@markup.heading.5"] = { fg = c.green }
        hl["@markup.heading.6"] = { fg = c.cyan }
        hl["@markup.quote"] = { fg = c.blue }
        hl["@markup.math"] = { fg = c.magenta }
        hl["@markup.list"] = { fg = c.blue }
        hl["@markup.list.checked"] = { fg = c.green }
        hl["@markup.list.unchecked"] = { fg = c.blue }
        hl["@markup.link"] = { fg = c.magenta }
        hl["@markup.link.label"] = { fg = c.bright_blue }
        hl["@markup.link.url"] = { fg = c.cyan, underline = true }
        hl["@markup.raw"] = { bg = c.bg_soft }
        hl["@markup.raw.block"] = { bg = c.bg_soft, fg = c.green }
    end,
})
bleacheda commented 4 months ago

Ah, I was trying it with hl.[ and also couldn't figure out the opts part in highlights.lua. Awesome, thanks.